<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Settings &mdash; Django 1.7.8.dev20150401230226 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.7.8.dev20150401230226',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Django 1.7.8.dev20150401230226 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="index.html" />
    <link rel="next" title="Signals" href="signals.html" />
    <link rel="prev" title="SchemaEditor" href="schema-editor.html" />



 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>


  </head>
  <body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 1.7.8.dev20150401230226 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="schema-editor.html" title="&lt;tt class=&#34;docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;SchemaEditor&lt;/span&gt;&lt;/tt&gt;">previous</a>
     |
    <a href="index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="signals.html" title="Signals">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="ref-settings">
            
  <div class="section" id="s-settings">
<span id="settings"></span><h1>Settings<a class="headerlink" href="#settings" title="Permalink to this headline">¶</a></h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#core-settings" id="id9">Core settings</a></li>
<li><a class="reference internal" href="#auth" id="id10">Auth</a></li>
<li><a class="reference internal" href="#comments" id="id11">Comments</a></li>
<li><a class="reference internal" href="#messages" id="id12">Messages</a></li>
<li><a class="reference internal" href="#sessions" id="id13">Sessions</a></li>
<li><a class="reference internal" href="#sites" id="id14">Sites</a></li>
<li><a class="reference internal" href="#static-files" id="id15">Static files</a></li>
<li><a class="reference internal" href="#core-settings-topical-index" id="id16">Core Settings Topical Index</a></li>
</ul>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Be careful when you override settings, especially when the default value
is a non-empty tuple or dictionary, such as <a class="reference internal" href="#std:setting-MIDDLEWARE_CLASSES"><tt class="xref std std-setting docutils literal"><span class="pre">MIDDLEWARE_CLASSES</span></tt></a>
and <a class="reference internal" href="#std:setting-TEMPLATE_CONTEXT_PROCESSORS"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_CONTEXT_PROCESSORS</span></tt></a>. Make sure you keep the
components required by the features of Django you wish to use.</p>
</div>
<div class="section" id="s-core-settings">
<span id="core-settings"></span><h2><a class="toc-backref" href="#id9">Core settings</a><a class="headerlink" href="#core-settings" title="Permalink to this headline">¶</a></h2>
<p>Here&#8217;s a list of settings available in Django core and their default values.
Settings provided by contrib apps are listed below, followed by a topical index
of the core settings. For introductory material, see the <a class="reference internal" href="../topics/settings.html"><em>settings topic
guide</em></a>.</p>
<div class="section" id="s-absolute-url-overrides">
<span id="s-std:setting-ABSOLUTE_URL_OVERRIDES"></span><span id="absolute-url-overrides"></span><span id="std:setting-ABSOLUTE_URL_OVERRIDES"></span><h3>ABSOLUTE_URL_OVERRIDES<a class="headerlink" href="#absolute-url-overrides" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">{}</span></tt> (Empty dictionary)</p>
<p>A dictionary mapping <tt class="docutils literal"><span class="pre">&quot;app_label.model_name&quot;</span></tt> strings to functions that take
a model object and return its URL. This is a way of inserting or overriding
<tt class="docutils literal"><span class="pre">get_absolute_url()</span></tt> methods on a per-installation basis. Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">ABSOLUTE_URL_OVERRIDES</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&#39;blogs.weblog&#39;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">o</span><span class="p">:</span> <span class="s">&quot;/blogs/</span><span class="si">%s</span><span class="s">/&quot;</span> <span class="o">%</span> <span class="n">o</span><span class="o">.</span><span class="n">slug</span><span class="p">,</span>
    <span class="s">&#39;news.story&#39;</span><span class="p">:</span> <span class="k">lambda</span> <span class="n">o</span><span class="p">:</span> <span class="s">&quot;/stories/</span><span class="si">%s</span><span class="s">/</span><span class="si">%s</span><span class="s">/&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">o</span><span class="o">.</span><span class="n">pub_year</span><span class="p">,</span> <span class="n">o</span><span class="o">.</span><span class="n">slug</span><span class="p">),</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Note that the model name used in this setting should be all lower-case, regardless
of the case of the actual model class name.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.7.1:</span> <p><tt class="docutils literal"><span class="pre">ABSOLUTE_URL_OVERRIDES</span></tt> now works on models that don&#8217;t declare
<tt class="docutils literal"><span class="pre">get_absolute_url()</span></tt>.</p>
</div>
</div>
<div class="section" id="s-admins">
<span id="s-std:setting-ADMINS"></span><span id="admins"></span><span id="std:setting-ADMINS"></span><h3>ADMINS<a class="headerlink" href="#admins" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple that lists people who get code error notifications. When
<tt class="docutils literal"><span class="pre">DEBUG=False</span></tt> and a view raises an exception, Django will email these people
with the full exception information. Each member of the tuple should be a tuple
of (Full name, email address). Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">((</span><span class="s">&#39;John&#39;</span><span class="p">,</span> <span class="s">&#39;john@example.com&#39;</span><span class="p">),</span> <span class="p">(</span><span class="s">&#39;Mary&#39;</span><span class="p">,</span> <span class="s">&#39;mary@example.com&#39;</span><span class="p">))</span>
</pre></div>
</div>
<p>Note that Django will email <em>all</em> of these people whenever an error happens.
See <a class="reference internal" href="../howto/error-reporting.html"><em>Error reporting</em></a> for more information.</p>
</div>
<div class="section" id="s-allowed-hosts">
<span id="s-std:setting-ALLOWED_HOSTS"></span><span id="allowed-hosts"></span><span id="std:setting-ALLOWED_HOSTS"></span><h3>ALLOWED_HOSTS<a class="headerlink" href="#allowed-hosts" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">[]</span></tt> (Empty list)</p>
<p>A list of strings representing the host/domain names that this Django site can
serve. This is a security measure to prevent an attacker from poisoning caches
and password reset emails with links to malicious hosts by submitting requests
with a fake HTTP <tt class="docutils literal"><span class="pre">Host</span></tt> header, which is possible even under many
seemingly-safe web server configurations.</p>
<p>Values in this list can be fully qualified names (e.g. <tt class="docutils literal"><span class="pre">'www.example.com'</span></tt>),
in which case they will be matched against the request&#8217;s <tt class="docutils literal"><span class="pre">Host</span></tt> header
exactly (case-insensitive, not including port). A value beginning with a period
can be used as a subdomain wildcard: <tt class="docutils literal"><span class="pre">'.example.com'</span></tt> will match
<tt class="docutils literal"><span class="pre">example.com</span></tt>, <tt class="docutils literal"><span class="pre">www.example.com</span></tt>, and any other subdomain of
<tt class="docutils literal"><span class="pre">example.com</span></tt>. A value of <tt class="docutils literal"><span class="pre">'*'</span></tt> will match anything; in this case you are
responsible to provide your own validation of the <tt class="docutils literal"><span class="pre">Host</span></tt> header (perhaps in a
middleware; if so this middleware must be listed first in
<a class="reference internal" href="#std:setting-MIDDLEWARE_CLASSES"><tt class="xref std std-setting docutils literal"><span class="pre">MIDDLEWARE_CLASSES</span></tt></a>).</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.7:</span> <p>In previous versions of Django, if you wanted to also allow the
<a class="reference external" href="http://en.wikipedia.org/wiki/Fully_qualified_domain_name">fully qualified domain name (FQDN)</a>, which some browsers can send in the
<tt class="docutils literal"><span class="pre">Host</span></tt> header, you had to explicitly add another <tt class="docutils literal"><span class="pre">ALLOWED_HOSTS</span></tt> entry
that included a trailing period. This entry could also be a subdomain
wildcard:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">ALLOWED_HOSTS</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">&#39;.example.com&#39;</span><span class="p">,</span>  <span class="c"># Allow domain and subdomains</span>
    <span class="s">&#39;.example.com.&#39;</span><span class="p">,</span>  <span class="c"># Also allow FQDN and subdomains</span>
<span class="p">]</span>
</pre></div>
</div>
<p>In Django 1.7, the trailing dot is stripped when performing host validation,
thus an entry with a trailing dot isn&#8217;t required.</p>
</div>
<p>If the <tt class="docutils literal"><span class="pre">Host</span></tt> header (or <tt class="docutils literal"><span class="pre">X-Forwarded-Host</span></tt> if
<a class="reference internal" href="#std:setting-USE_X_FORWARDED_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">USE_X_FORWARDED_HOST</span></tt></a> is enabled) does not match any value in this
list, the <a class="reference internal" href="request-response.html#django.http.HttpRequest.get_host" title="django.http.HttpRequest.get_host"><tt class="xref py py-meth docutils literal"><span class="pre">django.http.HttpRequest.get_host()</span></tt></a> method will raise
<a class="reference internal" href="exceptions.html#django.core.exceptions.SuspiciousOperation" title="django.core.exceptions.SuspiciousOperation"><tt class="xref py py-exc docutils literal"><span class="pre">SuspiciousOperation</span></tt></a>.</p>
<p>When <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt> or when running tests, host validation is
disabled; any host will be accepted. Thus it&#8217;s usually only necessary to set it
in production.</p>
<p>This validation only applies via <a class="reference internal" href="request-response.html#django.http.HttpRequest.get_host" title="django.http.HttpRequest.get_host"><tt class="xref py py-meth docutils literal"><span class="pre">get_host()</span></tt></a>;
if your code accesses the <tt class="docutils literal"><span class="pre">Host</span></tt> header directly from <tt class="docutils literal"><span class="pre">request.META</span></tt> you
are bypassing this security protection.</p>
</div>
<div class="section" id="s-allowed-include-roots">
<span id="s-std:setting-ALLOWED_INCLUDE_ROOTS"></span><span id="allowed-include-roots"></span><span id="std:setting-ALLOWED_INCLUDE_ROOTS"></span><h3>ALLOWED_INCLUDE_ROOTS<a class="headerlink" href="#allowed-include-roots" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple of strings representing allowed prefixes for the <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">ssi</span> <span class="pre">%}</span></tt> template
tag. This is a security measure, so that template authors can&#8217;t access files
that they shouldn&#8217;t be accessing.</p>
<p>For example, if <a class="reference internal" href="#std:setting-ALLOWED_INCLUDE_ROOTS"><tt class="xref std std-setting docutils literal"><span class="pre">ALLOWED_INCLUDE_ROOTS</span></tt></a> is <tt class="docutils literal"><span class="pre">('/home/html',</span> <span class="pre">'/var/www')</span></tt>,
then <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">ssi</span> <span class="pre">/home/html/foo.txt</span> <span class="pre">%}</span></tt> would work, but <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">ssi</span> <span class="pre">/etc/passwd</span> <span class="pre">%}</span></tt>
wouldn&#8217;t.</p>
</div>
<div class="section" id="s-append-slash">
<span id="s-std:setting-APPEND_SLASH"></span><span id="append-slash"></span><span id="std:setting-APPEND_SLASH"></span><h3>APPEND_SLASH<a class="headerlink" href="#append-slash" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<p>When set to <tt class="docutils literal"><span class="pre">True</span></tt>, if the request URL does not match any of the patterns
in the URLconf and it doesn&#8217;t end in a slash, an HTTP redirect is issued to the
same URL with a slash appended. Note that the redirect may cause any data
submitted in a POST request to be lost.</p>
<p>The <a class="reference internal" href="#std:setting-APPEND_SLASH"><tt class="xref std std-setting docutils literal"><span class="pre">APPEND_SLASH</span></tt></a> setting is only used if
<a class="reference internal" href="middleware.html#django.middleware.common.CommonMiddleware" title="django.middleware.common.CommonMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">CommonMiddleware</span></tt></a> is installed
(see <a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>). See also <a class="reference internal" href="#std:setting-PREPEND_WWW"><tt class="xref std std-setting docutils literal"><span class="pre">PREPEND_WWW</span></tt></a>.</p>
</div>
<div class="section" id="s-caches">
<span id="s-std:setting-CACHES"></span><span id="caches"></span><span id="std:setting-CACHES"></span><h3>CACHES<a class="headerlink" href="#caches" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
    <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&#39;BACKEND&#39;</span><span class="p">:</span> <span class="s">&#39;django.core.cache.backends.locmem.LocMemCache&#39;</span><span class="p">,</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>A dictionary containing the settings for all caches to be used with
Django. It is a nested dictionary whose contents maps cache aliases
to a dictionary containing the options for an individual cache.</p>
<p>The <a class="reference internal" href="#std:setting-CACHES"><tt class="xref std std-setting docutils literal"><span class="pre">CACHES</span></tt></a> setting must configure a <tt class="docutils literal"><span class="pre">default</span></tt> cache;
any number of additional caches may also be specified. If you
are using a cache backend other than the local memory cache, or
you need to define multiple caches, other options will be required.
The following cache options are available.</p>
<div class="section" id="s-backend">
<span id="s-std:setting-CACHES-BACKEND"></span><span id="backend"></span><span id="std:setting-CACHES-BACKEND"></span><h4>BACKEND<a class="headerlink" href="#backend" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The cache backend to use. The built-in cache backends are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'django.core.cache.backends.db.DatabaseCache'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.core.cache.backends.dummy.DummyCache'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.core.cache.backends.filebased.FileBasedCache'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.core.cache.backends.locmem.LocMemCache'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.core.cache.backends.memcached.MemcachedCache'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.core.cache.backends.memcached.PyLibMCCache'</span></tt></li>
</ul>
<p>You can use a cache backend that doesn&#8217;t ship with Django by setting
<a class="reference internal" href="#std:setting-CACHES-BACKEND"><tt class="xref std std-setting docutils literal"><span class="pre">BACKEND</span></tt></a> to a fully-qualified path of a cache
backend class (i.e. <tt class="docutils literal"><span class="pre">mypackage.backends.whatever.WhateverCache</span></tt>).</p>
</div>
<div class="section" id="s-key-function">
<span id="s-std:setting-CACHES-KEY_FUNCTION"></span><span id="key-function"></span><span id="std:setting-CACHES-KEY_FUNCTION"></span><h4>KEY_FUNCTION<a class="headerlink" href="#key-function" title="Permalink to this headline">¶</a></h4>
<p>A string containing a dotted path to a function (or any callable) that defines how to
compose a prefix, version and key into a final cache key. The default
implementation is equivalent to the function:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">make_key</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">key_prefix</span><span class="p">,</span> <span class="n">version</span><span class="p">):</span>
    <span class="k">return</span> <span class="s">&#39;:&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">key_prefix</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">version</span><span class="p">),</span> <span class="n">key</span><span class="p">])</span>
</pre></div>
</div>
<p>You may use any key function you want, as long as it has the same
argument signature.</p>
<p>See the <a class="reference internal" href="../topics/cache.html#cache-key-transformation"><em>cache documentation</em></a> for more
information.</p>
</div>
<div class="section" id="s-key-prefix">
<span id="s-std:setting-CACHES-KEY_PREFIX"></span><span id="key-prefix"></span><span id="std:setting-CACHES-KEY_PREFIX"></span><h4>KEY_PREFIX<a class="headerlink" href="#key-prefix" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>A string that will be automatically included (prepended by default) to
all cache keys used by the Django server.</p>
<p>See the <a class="reference internal" href="../topics/cache.html#cache-key-prefixing"><em>cache documentation</em></a> for more information.</p>
</div>
<div class="section" id="s-location">
<span id="s-std:setting-CACHES-LOCATION"></span><span id="location"></span><span id="std:setting-CACHES-LOCATION"></span><h4>LOCATION<a class="headerlink" href="#location" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The location of the cache to use. This might be the directory for a
file system cache, a host and port for a memcache server, or simply an
identifying name for a local memory cache. e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">CACHES</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&#39;BACKEND&#39;</span><span class="p">:</span> <span class="s">&#39;django.core.cache.backends.filebased.FileBasedCache&#39;</span><span class="p">,</span>
        <span class="s">&#39;LOCATION&#39;</span><span class="p">:</span> <span class="s">&#39;/var/tmp/django_cache&#39;</span><span class="p">,</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="s-options">
<span id="s-std:setting-CACHES-OPTIONS"></span><span id="options"></span><span id="std:setting-CACHES-OPTIONS"></span><h4>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h4>
<p>Default: None</p>
<p>Extra parameters to pass to the cache backend. Available parameters
vary depending on your cache backend.</p>
<p>Some information on available parameters can be found in the
<a class="reference internal" href="../topics/cache.html"><em>Cache Backends</em></a> documentation. For more information,
consult your backend module&#8217;s own documentation.</p>
</div>
<div class="section" id="s-timeout">
<span id="s-std:setting-CACHES-TIMEOUT"></span><span id="timeout"></span><span id="std:setting-CACHES-TIMEOUT"></span><h4>TIMEOUT<a class="headerlink" href="#timeout" title="Permalink to this headline">¶</a></h4>
<p>Default: 300</p>
<p>The number of seconds before a cache entry is considered stale.</p>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>If the value of this settings is <tt class="docutils literal"><span class="pre">None</span></tt>, cache entries will not expire.</p>
</div>
<div class="section" id="s-version">
<span id="s-std:setting-CACHES-VERSION"></span><span id="version"></span><span id="std:setting-CACHES-VERSION"></span><h4>VERSION<a class="headerlink" href="#version" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">1</span></tt></p>
<p>The default version number for cache keys generated by the Django server.</p>
<p>See the <a class="reference internal" href="../topics/cache.html#cache-versioning"><em>cache documentation</em></a> for more information.</p>
</div>
</div>
<div class="section" id="s-cache-middleware-alias">
<span id="s-std:setting-CACHE_MIDDLEWARE_ALIAS"></span><span id="cache-middleware-alias"></span><span id="std:setting-CACHE_MIDDLEWARE_ALIAS"></span><h3>CACHE_MIDDLEWARE_ALIAS<a class="headerlink" href="#cache-middleware-alias" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">default</span></tt></p>
<p>The cache connection to use for the <a class="reference internal" href="../topics/cache.html#the-per-site-cache"><em>cache middleware</em></a>.</p>
</div>
<div class="section" id="s-cache-middleware-anonymous-only">
<span id="s-std:setting-CACHE_MIDDLEWARE_ANONYMOUS_ONLY"></span><span id="cache-middleware-anonymous-only"></span><span id="std:setting-CACHE_MIDDLEWARE_ANONYMOUS_ONLY"></span><h3>CACHE_MIDDLEWARE_ANONYMOUS_ONLY<a class="headerlink" href="#cache-middleware-anonymous-only" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.6: </span>This setting was largely ineffective because of using cookies for sessions
and CSRF. See the <a class="reference internal" href="../releases/1.6.html"><em>Django 1.6 release notes</em></a> for more
information.</p>
</div>
<p>If the value of this setting is <tt class="docutils literal"><span class="pre">True</span></tt>, only anonymous requests (i.e., not
those made by a logged-in user) will be cached.  Otherwise, the middleware
caches every page that doesn&#8217;t have GET or POST parameters.</p>
<p>If you set the value of this setting to <tt class="docutils literal"><span class="pre">True</span></tt>, you should make sure you&#8217;ve
activated <tt class="docutils literal"><span class="pre">AuthenticationMiddleware</span></tt>.</p>
</div>
<div class="section" id="s-cache-middleware-key-prefix">
<span id="s-std:setting-CACHE_MIDDLEWARE_KEY_PREFIX"></span><span id="cache-middleware-key-prefix"></span><span id="std:setting-CACHE_MIDDLEWARE_KEY_PREFIX"></span><h3>CACHE_MIDDLEWARE_KEY_PREFIX<a class="headerlink" href="#cache-middleware-key-prefix" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>A string which will be prefixed to the cache keys generated by the <a class="reference internal" href="../topics/cache.html#the-per-site-cache"><em>cache
middleware</em></a>. This prefix is combined with the
<a class="reference internal" href="#std:setting-CACHES-KEY_PREFIX"><tt class="xref std std-setting docutils literal"><span class="pre">KEY_PREFIX</span></tt></a> setting; it does not replace it.</p>
<p>See <a class="reference internal" href="../topics/cache.html"><em>Django&#8217;s cache framework</em></a>.</p>
</div>
<div class="section" id="s-cache-middleware-seconds">
<span id="s-std:setting-CACHE_MIDDLEWARE_SECONDS"></span><span id="cache-middleware-seconds"></span><span id="std:setting-CACHE_MIDDLEWARE_SECONDS"></span><h3>CACHE_MIDDLEWARE_SECONDS<a class="headerlink" href="#cache-middleware-seconds" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">600</span></tt></p>
<p>The default number of seconds to cache a page for the <a class="reference internal" href="../topics/cache.html#the-per-site-cache"><em>cache middleware</em></a>.</p>
<p>See <a class="reference internal" href="../topics/cache.html"><em>Django&#8217;s cache framework</em></a>.</p>
<span class="target" id="settings-csrf"></span></div>
<div class="section" id="s-csrf-cookie-age">
<span id="s-std:setting-CSRF_COOKIE_AGE"></span><span id="csrf-cookie-age"></span><span id="std:setting-CSRF_COOKIE_AGE"></span><h3>CSRF_COOKIE_AGE<a class="headerlink" href="#csrf-cookie-age" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">31449600</span></tt> (1 year, in seconds)</p>
<p>The age of CSRF cookies, in seconds.</p>
<p>The reason for setting a long-lived expiration time is to avoid problems in
the case of a user closing a browser or bookmarking a page and then loading
that page from a browser cache. Without persistent cookies, the form submission
would fail in this case.</p>
<p>Some browsers (specifically Internet Explorer) can disallow the use of
persistent cookies or can have the indexes to the cookie jar corrupted on disk,
thereby causing CSRF protection checks to fail (and sometimes intermittently).
Change this setting to <tt class="docutils literal"><span class="pre">None</span></tt> to use session-based CSRF cookies, which
keep the cookies in-memory instead of on persistent storage.</p>
</div>
<div class="section" id="s-csrf-cookie-domain">
<span id="s-std:setting-CSRF_COOKIE_DOMAIN"></span><span id="csrf-cookie-domain"></span><span id="std:setting-CSRF_COOKIE_DOMAIN"></span><h3>CSRF_COOKIE_DOMAIN<a class="headerlink" href="#csrf-cookie-domain" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The domain to be used when setting the CSRF cookie.  This can be useful for
easily allowing cross-subdomain requests to be excluded from the normal cross
site request forgery protection.  It should be set to a string such as
<tt class="docutils literal"><span class="pre">&quot;.example.com&quot;</span></tt> to allow a POST request from a form on one subdomain to be
accepted by a view served from another subdomain.</p>
<p>Please note that the presence of this setting does not imply that Django&#8217;s CSRF
protection is safe from cross-subdomain attacks by default - please see the
<a class="reference internal" href="contrib/csrf.html#csrf-limitations"><em>CSRF limitations</em></a> section.</p>
</div>
<div class="section" id="s-csrf-cookie-httponly">
<span id="s-std:setting-CSRF_COOKIE_HTTPONLY"></span><span id="csrf-cookie-httponly"></span><span id="std:setting-CSRF_COOKIE_HTTPONLY"></span><h3>CSRF_COOKIE_HTTPONLY<a class="headerlink" href="#csrf-cookie-httponly" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.6.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to use <tt class="docutils literal"><span class="pre">HttpOnly</span></tt> flag on the CSRF cookie. If this is set to
<tt class="docutils literal"><span class="pre">True</span></tt>, client-side JavaScript will not to be able to access the CSRF cookie.
See <a class="reference internal" href="#std:setting-SESSION_COOKIE_HTTPONLY"><tt class="xref std std-setting docutils literal"><span class="pre">SESSION_COOKIE_HTTPONLY</span></tt></a> for details on <tt class="docutils literal"><span class="pre">HttpOnly</span></tt>.</p>
</div>
<div class="section" id="s-csrf-cookie-name">
<span id="s-std:setting-CSRF_COOKIE_NAME"></span><span id="csrf-cookie-name"></span><span id="std:setting-CSRF_COOKIE_NAME"></span><h3>CSRF_COOKIE_NAME<a class="headerlink" href="#csrf-cookie-name" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'csrftoken'</span></tt></p>
<p>The name of the cookie to use for the CSRF authentication token. This can be whatever you
want.  See <a class="reference internal" href="contrib/csrf.html"><em>Cross Site Request Forgery protection</em></a>.</p>
</div>
<div class="section" id="s-csrf-cookie-path">
<span id="s-std:setting-CSRF_COOKIE_PATH"></span><span id="csrf-cookie-path"></span><span id="std:setting-CSRF_COOKIE_PATH"></span><h3>CSRF_COOKIE_PATH<a class="headerlink" href="#csrf-cookie-path" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'/'</span></tt></p>
<p>The path set on the CSRF cookie. This should either match the URL path of your
Django installation or be a parent of that path.</p>
<p>This is useful if you have multiple Django instances running under the same
hostname. They can use different cookie paths, and each instance will only see
its own CSRF cookie.</p>
</div>
<div class="section" id="s-csrf-cookie-secure">
<span id="s-std:setting-CSRF_COOKIE_SECURE"></span><span id="csrf-cookie-secure"></span><span id="std:setting-CSRF_COOKIE_SECURE"></span><h3>CSRF_COOKIE_SECURE<a class="headerlink" href="#csrf-cookie-secure" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to use a secure cookie for the CSRF cookie. If this is set to <tt class="docutils literal"><span class="pre">True</span></tt>,
the cookie will be marked as &#8220;secure,&#8221; which means browsers may ensure that the
cookie is only sent under an HTTPS connection.</p>
</div>
<div class="section" id="s-csrf-failure-view">
<span id="s-std:setting-CSRF_FAILURE_VIEW"></span><span id="csrf-failure-view"></span><span id="std:setting-CSRF_FAILURE_VIEW"></span><h3>CSRF_FAILURE_VIEW<a class="headerlink" href="#csrf-failure-view" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.views.csrf.csrf_failure'</span></tt></p>
<p>A dotted path to the view function to be used when an incoming request
is rejected by the CSRF protection.  The function should have this signature:</p>
<div class="highlight-python"><div class="highlight"><pre>def csrf_failure(request, reason=&quot;&quot;)
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">reason</span></tt> is a short message (intended for developers or logging, not for
end users) indicating the reason the request was rejected.  See
<a class="reference internal" href="contrib/csrf.html"><em>Cross Site Request Forgery protection</em></a>.</p>
</div>
<div class="section" id="s-databases">
<span id="s-std:setting-DATABASES"></span><span id="databases"></span><span id="std:setting-DATABASES"></span><h3>DATABASES<a class="headerlink" href="#databases" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">{}</span></tt> (Empty dictionary)</p>
<p>A dictionary containing the settings for all databases to be used with
Django. It is a nested dictionary whose contents maps database aliases
to a dictionary containing the options for an individual database.</p>
<p>The <a class="reference internal" href="#std:setting-DATABASES"><tt class="xref std std-setting docutils literal"><span class="pre">DATABASES</span></tt></a> setting must configure a <tt class="docutils literal"><span class="pre">default</span></tt> database;
any number of additional databases may also be specified.</p>
<p>The simplest possible settings file is for a single-database setup using
SQLite. This can be configured using the following:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">DATABASES</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&#39;ENGINE&#39;</span><span class="p">:</span> <span class="s">&#39;django.db.backends.sqlite3&#39;</span><span class="p">,</span>
        <span class="s">&#39;NAME&#39;</span><span class="p">:</span> <span class="s">&#39;mydatabase&#39;</span><span class="p">,</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>When connecting to other database backends, such as MySQL, Oracle, or
PostgreSQL, additional connection parameters will be required. See
the <a class="reference internal" href="#std:setting-DATABASE-ENGINE"><tt class="xref std std-setting docutils literal"><span class="pre">ENGINE</span></tt></a> setting below on how to specify
other database types. This example is for PostgreSQL:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">DATABASES</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&#39;ENGINE&#39;</span><span class="p">:</span> <span class="s">&#39;django.db.backends.postgresql_psycopg2&#39;</span><span class="p">,</span>
        <span class="s">&#39;NAME&#39;</span><span class="p">:</span> <span class="s">&#39;mydatabase&#39;</span><span class="p">,</span>
        <span class="s">&#39;USER&#39;</span><span class="p">:</span> <span class="s">&#39;mydatabaseuser&#39;</span><span class="p">,</span>
        <span class="s">&#39;PASSWORD&#39;</span><span class="p">:</span> <span class="s">&#39;mypassword&#39;</span><span class="p">,</span>
        <span class="s">&#39;HOST&#39;</span><span class="p">:</span> <span class="s">&#39;127.0.0.1&#39;</span><span class="p">,</span>
        <span class="s">&#39;PORT&#39;</span><span class="p">:</span> <span class="s">&#39;5432&#39;</span><span class="p">,</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The following inner options that may be required for more complex
configurations are available:</p>
<div class="section" id="s-atomic-requests">
<span id="s-std:setting-DATABASE-ATOMIC_REQUESTS"></span><span id="atomic-requests"></span><span id="std:setting-DATABASE-ATOMIC_REQUESTS"></span><h4>ATOMIC_REQUESTS<a class="headerlink" href="#atomic-requests" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<span class="title">New in Django 1.6.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Set this to <tt class="docutils literal"><span class="pre">True</span></tt> to wrap each HTTP request in a transaction on this
database. See <a class="reference internal" href="../topics/db/transactions.html#tying-transactions-to-http-requests"><em>Tying transactions to HTTP requests</em></a>.</p>
</div>
<div class="section" id="s-autocommit">
<span id="s-std:setting-DATABASE-AUTOCOMMIT"></span><span id="autocommit"></span><span id="std:setting-DATABASE-AUTOCOMMIT"></span><h4>AUTOCOMMIT<a class="headerlink" href="#autocommit" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<span class="title">New in Django 1.6.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<p>Set this to <tt class="docutils literal"><span class="pre">False</span></tt> if you want to <a class="reference internal" href="../topics/db/transactions.html#deactivate-transaction-management"><em>disable Django&#8217;s transaction
management</em></a> and implement your own.</p>
</div>
<div class="section" id="s-engine">
<span id="s-std:setting-DATABASE-ENGINE"></span><span id="engine"></span><span id="std:setting-DATABASE-ENGINE"></span><h4>ENGINE<a class="headerlink" href="#engine" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The database backend to use. The built-in database backends are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'django.db.backends.postgresql_psycopg2'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.db.backends.mysql'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.db.backends.sqlite3'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.db.backends.oracle'</span></tt></li>
</ul>
<p>You can use a database backend that doesn&#8217;t ship with Django by setting
<tt class="docutils literal"><span class="pre">ENGINE</span></tt> to a fully-qualified path (i.e.
<tt class="docutils literal"><span class="pre">mypackage.backends.whatever</span></tt>).</p>
</div>
<div class="section" id="s-host">
<span id="s-std:setting-HOST"></span><span id="host"></span><span id="std:setting-HOST"></span><h4>HOST<a class="headerlink" href="#host" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Which host to use when connecting to the database. An empty string means
localhost. Not used with SQLite.</p>
<p>If this value starts with a forward slash (<tt class="docutils literal"><span class="pre">'/'</span></tt>) and you&#8217;re using MySQL,
MySQL will connect via a Unix socket to the specified socket. For example:</p>
<div class="highlight-python"><div class="highlight"><pre>&quot;HOST&quot;: &#39;/var/run/mysql&#39;
</pre></div>
</div>
<p>If you&#8217;re using MySQL and this value <em>doesn&#8217;t</em> start with a forward slash, then
this value is assumed to be the host.</p>
<p>If you&#8217;re using PostgreSQL, by default (empty <a class="reference internal" href="#std:setting-HOST"><tt class="xref std std-setting docutils literal"><span class="pre">HOST</span></tt></a>), the connection
to the database is done through UNIX domain sockets (&#8216;local&#8217; lines in
<tt class="docutils literal"><span class="pre">pg_hba.conf</span></tt>). If your UNIX domain socket is not in the standard location,
use the same value of <tt class="docutils literal"><span class="pre">unix_socket_directory</span></tt> from <tt class="docutils literal"><span class="pre">postgresql.conf</span></tt>.
If you want to connect through TCP sockets, set <a class="reference internal" href="#std:setting-HOST"><tt class="xref std std-setting docutils literal"><span class="pre">HOST</span></tt></a> to &#8216;localhost&#8217;
or &#8216;127.0.0.1&#8217; (&#8216;host&#8217; lines in <tt class="docutils literal"><span class="pre">pg_hba.conf</span></tt>).
On Windows, you should always define <a class="reference internal" href="#std:setting-HOST"><tt class="xref std std-setting docutils literal"><span class="pre">HOST</span></tt></a>, as UNIX domain sockets
are not available.</p>
</div>
<div class="section" id="s-name">
<span id="s-std:setting-NAME"></span><span id="name"></span><span id="std:setting-NAME"></span><h4>NAME<a class="headerlink" href="#name" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The name of the database to use. For SQLite, it&#8217;s the full path to the database
file. When specifying the path, always use forward slashes, even on Windows
(e.g. <tt class="docutils literal"><span class="pre">C:/homes/user/mysite/sqlite3.db</span></tt>).</p>
</div>
<div class="section" id="s-conn-max-age">
<span id="s-std:setting-CONN_MAX_AGE"></span><span id="conn-max-age"></span><span id="std:setting-CONN_MAX_AGE"></span><h4>CONN_MAX_AGE<a class="headerlink" href="#conn-max-age" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<span class="title">New in Django 1.6.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">0</span></tt></p>
<p>The lifetime of a database connection, in seconds. Use <tt class="docutils literal"><span class="pre">0</span></tt> to close database
connections at the end of each request — Django&#8217;s historical behavior — and
<tt class="docutils literal"><span class="pre">None</span></tt> for unlimited persistent connections.</p>
</div>
<div class="section" id="s-std:setting-OPTIONS">
<span id="s-id1"></span><span id="std:setting-OPTIONS"></span><span id="id1"></span><h4>OPTIONS<a class="headerlink" href="#std:setting-OPTIONS" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">{}</span></tt> (Empty dictionary)</p>
<p>Extra parameters to use when connecting to the database. Available parameters
vary depending on your database backend.</p>
<p>Some information on available parameters can be found in the
<a class="reference internal" href="databases.html"><em>Database Backends</em></a> documentation. For more information,
consult your backend module&#8217;s own documentation.</p>
</div>
<div class="section" id="s-password">
<span id="s-std:setting-PASSWORD"></span><span id="password"></span><span id="std:setting-PASSWORD"></span><h4>PASSWORD<a class="headerlink" href="#password" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The password to use when connecting to the database. Not used with SQLite.</p>
</div>
<div class="section" id="s-port">
<span id="s-std:setting-PORT"></span><span id="port"></span><span id="std:setting-PORT"></span><h4>PORT<a class="headerlink" href="#port" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The port to use when connecting to the database. An empty string means the
default port. Not used with SQLite.</p>
</div>
<div class="section" id="s-user">
<span id="s-std:setting-USER"></span><span id="user"></span><span id="std:setting-USER"></span><h4>USER<a class="headerlink" href="#user" title="Permalink to this headline">¶</a></h4>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>The username to use when connecting to the database. Not used with SQLite.</p>
</div>
<div class="section" id="s-test">
<span id="s-std:setting-DATABASE-TEST"></span><span id="test"></span><span id="std:setting-DATABASE-TEST"></span><h4>TEST<a class="headerlink" href="#test" title="Permalink to this headline">¶</a></h4>
<div class="versionchanged">
<span class="title">Changed in Django 1.7:</span> <p>All <a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> sub-entries used to be independent
entries in the database settings dictionary, with a <tt class="docutils literal"><span class="pre">TEST_</span></tt> prefix.
For backwards compatibility with older versions of Django, you can define
both versions of the settings as long as they match.
Further, <tt class="docutils literal"><span class="pre">TEST_CREATE</span></tt>, <tt class="docutils literal"><span class="pre">TEST_USER_CREATE</span></tt> and <tt class="docutils literal"><span class="pre">TEST_PASSWD</span></tt>
were changed to <tt class="docutils literal"><span class="pre">CREATE_DB</span></tt>, <tt class="docutils literal"><span class="pre">CREATE_USER</span></tt> and <tt class="docutils literal"><span class="pre">PASSWORD</span></tt>
respectively.</p>
</div>
<p>Default: <tt class="docutils literal"><span class="pre">{}</span></tt></p>
<p>A dictionary of settings for test databases; for more details about the
creation and use of test databases, see <a class="reference internal" href="../topics/testing/overview.html#the-test-database"><em>The test database</em></a>. The
following entries are available:</p>
<div class="section" id="s-charset">
<span id="s-std:setting-TEST_CHARSET"></span><span id="charset"></span><span id="std:setting-TEST_CHARSET"></span><h5>CHARSET<a class="headerlink" href="#charset" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The character set encoding used to create the test database. The value of this
string is passed directly through to the database, so its format is
backend-specific.</p>
<p>Supported for the <a class="reference external" href="http://www.postgresql.org/docs/current/static/multibyte.html">PostgreSQL</a> (<tt class="docutils literal"><span class="pre">postgresql_psycopg2</span></tt>) and <a class="reference external" href="http://dev.mysql.com/doc/refman/5.6/en/charset-database.html">MySQL</a> (<tt class="docutils literal"><span class="pre">mysql</span></tt>)
backends.</p>
</div>
<div class="section" id="s-collation">
<span id="s-std:setting-TEST_COLLATION"></span><span id="collation"></span><span id="std:setting-TEST_COLLATION"></span><h5>COLLATION<a class="headerlink" href="#collation" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The collation order to use when creating the test database. This value is
passed directly to the backend, so its format is backend-specific.</p>
<p>Only supported for the <tt class="docutils literal"><span class="pre">mysql</span></tt> backend (see the <a class="reference external" href="http://dev.mysql.com/doc/refman/5.6/en/charset-database.html">MySQL manual</a> for details).</p>
</div>
<div class="section" id="s-dependencies">
<span id="s-std:setting-TEST_DEPENDENCIES"></span><span id="dependencies"></span><span id="std:setting-TEST_DEPENDENCIES"></span><h5>DEPENDENCIES<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">['default']</span></tt>, for all databases other than <tt class="docutils literal"><span class="pre">default</span></tt>,
which has no dependencies.</p>
<p>The creation-order dependencies of the database. See the documentation
on <a class="reference internal" href="../topics/testing/advanced.html#topics-testing-creation-dependencies"><em>controlling the creation order of test databases</em></a> for details.</p>
</div>
<div class="section" id="s-mirror">
<span id="s-std:setting-TEST_MIRROR"></span><span id="mirror"></span><span id="std:setting-TEST_MIRROR"></span><h5>MIRROR<a class="headerlink" href="#mirror" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The alias of the database that this database should mirror during
testing.</p>
<p>This setting exists to allow for testing of master/slave
configurations of multiple databases. See the documentation on
<a class="reference internal" href="../topics/testing/advanced.html#topics-testing-masterslave"><em>testing master/slave configurations</em></a> for details.</p>
</div>
<div class="section" id="s-std:setting-TEST_NAME">
<span id="s-id2"></span><span id="std:setting-TEST_NAME"></span><span id="id2"></span><h5>NAME<a class="headerlink" href="#std:setting-TEST_NAME" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The name of database to use when running the test suite.</p>
<p>If the default value (<tt class="docutils literal"><span class="pre">None</span></tt>) is used with the SQLite database engine, the
tests will use a memory resident database. For all other database engines the
test database will use the name <tt class="docutils literal"><span class="pre">'test_'</span> <span class="pre">+</span> <span class="pre">DATABASE_NAME</span></tt>.</p>
<p>See <a class="reference internal" href="../topics/testing/overview.html#the-test-database"><em>The test database</em></a>.</p>
</div>
<div class="section" id="s-serialize">
<span id="s-std:setting-TEST_SERIALIZE"></span><span id="serialize"></span><span id="std:setting-TEST_SERIALIZE"></span><h5>SERIALIZE<a class="headerlink" href="#serialize" title="Permalink to this headline">¶</a></h5>
<div class="versionadded">
<span class="title">New in Django 1.7.1.</span> </div>
<p>Boolean value to control whether or not the default test runner serializes the
database into an in-memory JSON string before running tests (used to restore
the database state between tests if you don&#8217;t have transactions). You can set
this to <tt class="docutils literal"><span class="pre">False</span></tt> to speed up creation time if you don&#8217;t have any test classes
with <a class="reference internal" href="../topics/testing/overview.html#test-case-serialized-rollback"><em>serialized_rollback=True</em></a>.</p>
</div>
<div class="section" id="s-create-db">
<span id="s-std:setting-TEST_CREATE"></span><span id="create-db"></span><span id="std:setting-TEST_CREATE"></span><h5>CREATE_DB<a class="headerlink" href="#create-db" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<p>This is an Oracle-specific setting.</p>
<p>If it is set to <tt class="docutils literal"><span class="pre">False</span></tt>, the test tablespaces won&#8217;t be automatically created
at the beginning of the tests and dropped at the end.</p>
</div>
<div class="section" id="s-create-user">
<span id="s-std:setting-TEST_USER_CREATE"></span><span id="create-user"></span><span id="std:setting-TEST_USER_CREATE"></span><h5>CREATE_USER<a class="headerlink" href="#create-user" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<p>This is an Oracle-specific setting.</p>
<p>If it is set to <tt class="docutils literal"><span class="pre">False</span></tt>, the test user won&#8217;t be automatically created at the
beginning of the tests and dropped at the end.</p>
</div>
<div class="section" id="s-std:setting-TEST_USER">
<span id="s-id3"></span><span id="std:setting-TEST_USER"></span><span id="id3"></span><h5>USER<a class="headerlink" href="#std:setting-TEST_USER" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>This is an Oracle-specific setting.</p>
<p>The username to use when connecting to the Oracle database that will be used
when running tests. If not provided, Django will use <tt class="docutils literal"><span class="pre">'test_'</span> <span class="pre">+</span> <span class="pre">USER</span></tt>.</p>
</div>
<div class="section" id="s-std:setting-TEST_PASSWD">
<span id="s-id4"></span><span id="std:setting-TEST_PASSWD"></span><span id="id4"></span><h5>PASSWORD<a class="headerlink" href="#std:setting-TEST_PASSWD" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>This is an Oracle-specific setting.</p>
<p>The password to use when connecting to the Oracle database that will be used
when running tests. If not provided, Django will use a hardcoded default value.</p>
</div>
<div class="section" id="s-tblspace">
<span id="s-std:setting-TEST_TBLSPACE"></span><span id="tblspace"></span><span id="std:setting-TEST_TBLSPACE"></span><h5>TBLSPACE<a class="headerlink" href="#tblspace" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>This is an Oracle-specific setting.</p>
<p>The name of the tablespace that will be used when running tests. If not
provided, Django will use <tt class="docutils literal"><span class="pre">'test_'</span> <span class="pre">+</span> <span class="pre">NAME</span></tt>.</p>
</div>
<div class="section" id="s-tblspace-tmp">
<span id="s-std:setting-TEST_TBLSPACE_TMP"></span><span id="tblspace-tmp"></span><span id="std:setting-TEST_TBLSPACE_TMP"></span><h5>TBLSPACE_TMP<a class="headerlink" href="#tblspace-tmp" title="Permalink to this headline">¶</a></h5>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>This is an Oracle-specific setting.</p>
<p>The name of the temporary tablespace that will be used when running tests. If
not provided, Django will use <tt class="docutils literal"><span class="pre">'test_'</span> <span class="pre">+</span> <span class="pre">NAME</span> <span class="pre">+</span> <span class="pre">'_temp'</span></tt>.</p>
</div>
</div>
<div class="section" id="s-test-charset">
<span id="s-std:setting-OLD_TEST_CHARSET"></span><span id="test-charset"></span><span id="std:setting-OLD_TEST_CHARSET"></span><h4>TEST_CHARSET<a class="headerlink" href="#test-charset" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_CHARSET"><tt class="xref std std-setting docutils literal"><span class="pre">CHARSET</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-collation">
<span id="s-std:setting-OLD_TEST_COLLATION"></span><span id="test-collation"></span><span id="std:setting-OLD_TEST_COLLATION"></span><h4>TEST_COLLATION<a class="headerlink" href="#test-collation" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_COLLATION"><tt class="xref std std-setting docutils literal"><span class="pre">COLLATION</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-dependencies">
<span id="s-std:setting-OLD_TEST_DEPENDENCIES"></span><span id="test-dependencies"></span><span id="std:setting-OLD_TEST_DEPENDENCIES"></span><h4>TEST_DEPENDENCIES<a class="headerlink" href="#test-dependencies" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_DEPENDENCIES"><tt class="xref std std-setting docutils literal"><span class="pre">DEPENDENCIES</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-mirror">
<span id="s-std:setting-OLD_TEST_MIRROR"></span><span id="test-mirror"></span><span id="std:setting-OLD_TEST_MIRROR"></span><h4>TEST_MIRROR<a class="headerlink" href="#test-mirror" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_MIRROR"><tt class="xref std std-setting docutils literal"><span class="pre">MIRROR</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-name">
<span id="s-std:setting-OLD_TEST_NAME"></span><span id="test-name"></span><span id="std:setting-OLD_TEST_NAME"></span><h4>TEST_NAME<a class="headerlink" href="#test-name" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">NAME</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-create">
<span id="s-std:setting-OLD_TEST_CREATE"></span><span id="test-create"></span><span id="std:setting-OLD_TEST_CREATE"></span><h4>TEST_CREATE<a class="headerlink" href="#test-create" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_CREATE"><tt class="xref std std-setting docutils literal"><span class="pre">CREATE_DB</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-user">
<span id="s-std:setting-OLD_TEST_USER"></span><span id="test-user"></span><span id="std:setting-OLD_TEST_USER"></span><h4>TEST_USER<a class="headerlink" href="#test-user" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_USER"><tt class="xref std std-setting docutils literal"><span class="pre">USER</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-user-create">
<span id="s-std:setting-OLD_TEST_USER_CREATE"></span><span id="test-user-create"></span><span id="std:setting-OLD_TEST_USER_CREATE"></span><h4>TEST_USER_CREATE<a class="headerlink" href="#test-user-create" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_USER_CREATE"><tt class="xref std std-setting docutils literal"><span class="pre">CREATE_USER</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-passwd">
<span id="s-std:setting-OLD_TEST_PASSWD"></span><span id="test-passwd"></span><span id="std:setting-OLD_TEST_PASSWD"></span><h4>TEST_PASSWD<a class="headerlink" href="#test-passwd" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_PASSWD"><tt class="xref std std-setting docutils literal"><span class="pre">PASSWORD</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-tblspace">
<span id="s-std:setting-OLD_TEST_TBLSPACE"></span><span id="test-tblspace"></span><span id="std:setting-OLD_TEST_TBLSPACE"></span><h4>TEST_TBLSPACE<a class="headerlink" href="#test-tblspace" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_TBLSPACE"><tt class="xref std std-setting docutils literal"><span class="pre">TBLSPACE</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
<div class="section" id="s-test-tblspace-tmp">
<span id="s-std:setting-OLD_TEST_TBLSPACE_TMP"></span><span id="test-tblspace-tmp"></span><span id="std:setting-OLD_TEST_TBLSPACE_TMP"></span><h4>TEST_TBLSPACE_TMP<a class="headerlink" href="#test-tblspace-tmp" title="Permalink to this headline">¶</a></h4>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.7: </span>Use the <a class="reference internal" href="#std:setting-TEST_TBLSPACE_TMP"><tt class="xref std std-setting docutils literal"><span class="pre">TBLSPACE_TMP</span></tt></a> entry in the
<a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a> dictionary.</p>
</div>
</div>
</div>
<div class="section" id="s-database-routers">
<span id="s-std:setting-DATABASE_ROUTERS"></span><span id="database-routers"></span><span id="std:setting-DATABASE_ROUTERS"></span><h3>DATABASE_ROUTERS<a class="headerlink" href="#database-routers" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">[]</span></tt> (Empty list)</p>
<p>The list of routers that will be used to determine which database
to use when performing a database queries.</p>
<p>See the documentation on <a class="reference internal" href="../topics/db/multi-db.html#topics-db-multi-db-routing"><em>automatic database routing in multi
database configurations</em></a>.</p>
</div>
<div class="section" id="s-date-format">
<span id="s-std:setting-DATE_FORMAT"></span><span id="date-format"></span><span id="std:setting-DATE_FORMAT"></span><h3>DATE_FORMAT<a class="headerlink" href="#date-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'N</span> <span class="pre">j,</span> <span class="pre">Y'</span></tt> (e.g. <tt class="docutils literal"><span class="pre">Feb.</span> <span class="pre">4,</span> <span class="pre">2003</span></tt>)</p>
<p>The default formatting to use for displaying date fields in any part of the
system. Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the
locale-dictated format has higher precedence and will be applied instead. See
<a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>.</p>
<p>See also <a class="reference internal" href="#std:setting-DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-TIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_FORMAT</span></tt></a> and <a class="reference internal" href="#std:setting-SHORT_DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATE_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-date-input-formats">
<span id="s-std:setting-DATE_INPUT_FORMATS"></span><span id="date-input-formats"></span><span id="std:setting-DATE_INPUT_FORMATS"></span><h3>DATE_INPUT_FORMATS<a class="headerlink" href="#date-input-formats" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span>
    <span class="s">&#39;%Y-%m-</span><span class="si">%d</span><span class="s">&#39;</span><span class="p">,</span> <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%Y&#39;</span><span class="p">,</span> <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%y&#39;</span><span class="p">,</span> <span class="c"># &#39;2006-10-25&#39;, &#39;10/25/2006&#39;, &#39;10/25/06&#39;</span>
    <span class="s">&#39;%b </span><span class="si">%d</span><span class="s"> %Y&#39;</span><span class="p">,</span> <span class="s">&#39;%b </span><span class="si">%d</span><span class="s">, %Y&#39;</span><span class="p">,</span>            <span class="c"># &#39;Oct 25 2006&#39;, &#39;Oct 25, 2006&#39;</span>
    <span class="s">&#39;</span><span class="si">%d</span><span class="s"> %b %Y&#39;</span><span class="p">,</span> <span class="s">&#39;</span><span class="si">%d</span><span class="s"> %b, %Y&#39;</span><span class="p">,</span>            <span class="c"># &#39;25 Oct 2006&#39;, &#39;25 Oct, 2006&#39;</span>
    <span class="s">&#39;%B </span><span class="si">%d</span><span class="s"> %Y&#39;</span><span class="p">,</span> <span class="s">&#39;%B </span><span class="si">%d</span><span class="s">, %Y&#39;</span><span class="p">,</span>            <span class="c"># &#39;October 25 2006&#39;, &#39;October 25, 2006&#39;</span>
    <span class="s">&#39;</span><span class="si">%d</span><span class="s"> %B %Y&#39;</span><span class="p">,</span> <span class="s">&#39;</span><span class="si">%d</span><span class="s"> %B, %Y&#39;</span><span class="p">,</span>            <span class="c"># &#39;25 October 2006&#39;, &#39;25 October, 2006&#39;</span>
<span class="p">)</span>
</pre></div>
</div>
<p>A tuple of formats that will be accepted when inputting data on a date field.
Formats will be tried in order, using the first valid one. Note that these
format strings use Python&#8217;s <a class="reference external" href="http://docs.python.org/library/datetime.html#strftime-strptime-behavior">datetime</a> module syntax, not the format strings
from the <tt class="docutils literal"><span class="pre">date</span></tt> Django template tag.</p>
<p>When <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt>, the locale-dictated format has higher
precedence and will be applied instead.</p>
<p>See also <a class="reference internal" href="#std:setting-DATETIME_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_INPUT_FORMATS</span></tt></a> and <a class="reference internal" href="#std:setting-TIME_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_INPUT_FORMATS</span></tt></a>.</p>
</div>
<div class="section" id="s-datetime-format">
<span id="s-std:setting-DATETIME_FORMAT"></span><span id="datetime-format"></span><span id="std:setting-DATETIME_FORMAT"></span><h3>DATETIME_FORMAT<a class="headerlink" href="#datetime-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'N</span> <span class="pre">j,</span> <span class="pre">Y,</span> <span class="pre">P'</span></tt> (e.g. <tt class="docutils literal"><span class="pre">Feb.</span> <span class="pre">4,</span> <span class="pre">2003,</span> <span class="pre">4</span> <span class="pre">p.m.</span></tt>)</p>
<p>The default formatting to use for displaying datetime fields in any part of the
system. Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the
locale-dictated format has higher precedence and will be applied instead. See
<a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>.</p>
<p>See also <a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-TIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_FORMAT</span></tt></a> and <a class="reference internal" href="#std:setting-SHORT_DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATETIME_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-datetime-input-formats">
<span id="s-std:setting-DATETIME_INPUT_FORMATS"></span><span id="datetime-input-formats"></span><span id="std:setting-DATETIME_INPUT_FORMATS"></span><h3>DATETIME_INPUT_FORMATS<a class="headerlink" href="#datetime-input-formats" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span>
    <span class="s">&#39;%Y-%m-</span><span class="si">%d</span><span class="s"> %H:%M:%S&#39;</span><span class="p">,</span>     <span class="c"># &#39;2006-10-25 14:30:59&#39;</span>
    <span class="s">&#39;%Y-%m-</span><span class="si">%d</span><span class="s"> %H:%M:%S.</span><span class="si">%f</span><span class="s">&#39;</span><span class="p">,</span>  <span class="c"># &#39;2006-10-25 14:30:59.000200&#39;</span>
    <span class="s">&#39;%Y-%m-</span><span class="si">%d</span><span class="s"> %H:%M&#39;</span><span class="p">,</span>        <span class="c"># &#39;2006-10-25 14:30&#39;</span>
    <span class="s">&#39;%Y-%m-</span><span class="si">%d</span><span class="s">&#39;</span><span class="p">,</span>              <span class="c"># &#39;2006-10-25&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%Y %H:%M:%S&#39;</span><span class="p">,</span>     <span class="c"># &#39;10/25/2006 14:30:59&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%Y %H:%M:%S.</span><span class="si">%f</span><span class="s">&#39;</span><span class="p">,</span>  <span class="c"># &#39;10/25/2006 14:30:59.000200&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%Y %H:%M&#39;</span><span class="p">,</span>        <span class="c"># &#39;10/25/2006 14:30&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%Y&#39;</span><span class="p">,</span>              <span class="c"># &#39;10/25/2006&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%y %H:%M:%S&#39;</span><span class="p">,</span>     <span class="c"># &#39;10/25/06 14:30:59&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%y %H:%M:%S.</span><span class="si">%f</span><span class="s">&#39;</span><span class="p">,</span>  <span class="c"># &#39;10/25/06 14:30:59.000200&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%y %H:%M&#39;</span><span class="p">,</span>        <span class="c"># &#39;10/25/06 14:30&#39;</span>
    <span class="s">&#39;%m/</span><span class="si">%d</span><span class="s">/%y&#39;</span><span class="p">,</span>              <span class="c"># &#39;10/25/06&#39;</span>
<span class="p">)</span>
</pre></div>
</div>
<p>A tuple of formats that will be accepted when inputting data on a datetime
field. Formats will be tried in order, using the first valid one. Note that
these format strings use Python&#8217;s <a class="reference external" href="http://docs.python.org/library/datetime.html#strftime-strptime-behavior">datetime</a> module syntax, not the format
strings from the <tt class="docutils literal"><span class="pre">date</span></tt> Django template tag.</p>
<p>When <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt>, the locale-dictated format has higher
precedence and will be applied instead.</p>
<p>See also <a class="reference internal" href="#std:setting-DATE_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_INPUT_FORMATS</span></tt></a> and <a class="reference internal" href="#std:setting-TIME_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_INPUT_FORMATS</span></tt></a>.</p>
</div>
<div class="section" id="s-debug">
<span id="s-std:setting-DEBUG"></span><span id="debug"></span><span id="std:setting-DEBUG"></span><h3>DEBUG<a class="headerlink" href="#debug" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that turns on/off debug mode.</p>
<p>Never deploy a site into production with <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> turned on.</p>
<p>Did you catch that? NEVER deploy a site into production with <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a>
turned on.</p>
<p>One of the main features of debug mode is the display of detailed error pages.
If your app raises an exception when <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt>, Django will
display a detailed traceback, including a lot of metadata about your
environment, such as all the currently defined Django settings (from
<tt class="docutils literal"><span class="pre">settings.py</span></tt>).</p>
<p>As a security measure, Django will <em>not</em> include settings that might be
sensitive (or offensive), such as <a class="reference internal" href="#std:setting-SECRET_KEY"><tt class="xref std std-setting docutils literal"><span class="pre">SECRET_KEY</span></tt></a> or
<a class="reference internal" href="#std:setting-PROFANITIES_LIST"><tt class="xref std std-setting docutils literal"><span class="pre">PROFANITIES_LIST</span></tt></a>. Specifically, it will exclude any setting whose
name includes any of the following:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'API'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'KEY'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'PASS'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'PROFANITIES_LIST'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'SECRET'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'SIGNATURE'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'TOKEN'</span></tt></li>
</ul>
<p>Note that these are <em>partial</em> matches. <tt class="docutils literal"><span class="pre">'PASS'</span></tt> will also match PASSWORD,
just as <tt class="docutils literal"><span class="pre">'TOKEN'</span></tt> will also match TOKENIZED and so on.</p>
<p>Still, note that there are always going to be sections of your debug output
that are inappropriate for public consumption. File paths, configuration
options and the like all give attackers extra information about your server.</p>
<p>It is also important to remember that when running with <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a>
turned on, Django will remember every SQL query it executes. This is useful
when you&#8217;re debugging, but it&#8217;ll rapidly consume memory on a production server.</p>
<p>Finally, if <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> is <tt class="docutils literal"><span class="pre">False</span></tt>, you also need to properly set
the <a class="reference internal" href="#std:setting-ALLOWED_HOSTS"><tt class="xref std std-setting docutils literal"><span class="pre">ALLOWED_HOSTS</span></tt></a> setting. Failing to do so will result in all
requests being returned as &#8220;Bad Request (400)&#8221;.</p>
</div>
<div class="section" id="s-debug-propagate-exceptions">
<span id="s-std:setting-DEBUG_PROPAGATE_EXCEPTIONS"></span><span id="debug-propagate-exceptions"></span><span id="std:setting-DEBUG_PROPAGATE_EXCEPTIONS"></span><h3>DEBUG_PROPAGATE_EXCEPTIONS<a class="headerlink" href="#debug-propagate-exceptions" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>If set to True, Django&#8217;s normal exception handling of view functions
will be suppressed, and exceptions will propagate upwards.  This can
be useful for some test setups, and should never be used on a live
site.</p>
</div>
<div class="section" id="s-decimal-separator">
<span id="s-std:setting-DECIMAL_SEPARATOR"></span><span id="decimal-separator"></span><span id="std:setting-DECIMAL_SEPARATOR"></span><h3>DECIMAL_SEPARATOR<a class="headerlink" href="#decimal-separator" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'.'</span></tt> (Dot)</p>
<p>Default decimal separator used when formatting decimal numbers.</p>
<p>Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the locale-dictated
format has higher precedence and will be applied instead.</p>
<p>See also <a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a>, <a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a> and
<a class="reference internal" href="#std:setting-USE_THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">USE_THOUSAND_SEPARATOR</span></tt></a>.</p>
</div>
<div class="section" id="s-default-charset">
<span id="s-std:setting-DEFAULT_CHARSET"></span><span id="default-charset"></span><span id="std:setting-DEFAULT_CHARSET"></span><h3>DEFAULT_CHARSET<a class="headerlink" href="#default-charset" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'utf-8'</span></tt></p>
<p>Default charset to use for all <tt class="docutils literal"><span class="pre">HttpResponse</span></tt> objects, if a MIME type isn&#8217;t
manually specified. Used with <a class="reference internal" href="#std:setting-DEFAULT_CONTENT_TYPE"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_CONTENT_TYPE</span></tt></a> to construct the
<tt class="docutils literal"><span class="pre">Content-Type</span></tt> header.</p>
</div>
<div class="section" id="s-default-content-type">
<span id="s-std:setting-DEFAULT_CONTENT_TYPE"></span><span id="default-content-type"></span><span id="std:setting-DEFAULT_CONTENT_TYPE"></span><h3>DEFAULT_CONTENT_TYPE<a class="headerlink" href="#default-content-type" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'text/html'</span></tt></p>
<p>Default content type to use for all <tt class="docutils literal"><span class="pre">HttpResponse</span></tt> objects, if a MIME type
isn&#8217;t manually specified. Used with <a class="reference internal" href="#std:setting-DEFAULT_CHARSET"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_CHARSET</span></tt></a> to construct
the <tt class="docutils literal"><span class="pre">Content-Type</span></tt> header.</p>
</div>
<div class="section" id="s-default-exception-reporter-filter">
<span id="s-std:setting-DEFAULT_EXCEPTION_REPORTER_FILTER"></span><span id="default-exception-reporter-filter"></span><span id="std:setting-DEFAULT_EXCEPTION_REPORTER_FILTER"></span><h3>DEFAULT_EXCEPTION_REPORTER_FILTER<a class="headerlink" href="#default-exception-reporter-filter" title="Permalink to this headline">¶</a></h3>
<p>Default: <a class="reference internal" href="../howto/error-reporting.html#django.views.debug.SafeExceptionReporterFilter" title="django.views.debug.SafeExceptionReporterFilter"><tt class="xref py py-class docutils literal"><span class="pre">django.views.debug.SafeExceptionReporterFilter</span></tt></a></p>
<p>Default exception reporter filter class to be used if none has been assigned to
the <a class="reference internal" href="request-response.html#django.http.HttpRequest" title="django.http.HttpRequest"><tt class="xref py py-class docutils literal"><span class="pre">HttpRequest</span></tt></a> instance yet.
See <a class="reference internal" href="../howto/error-reporting.html#filtering-error-reports"><em>Filtering error reports</em></a>.</p>
</div>
<div class="section" id="s-default-file-storage">
<span id="s-std:setting-DEFAULT_FILE_STORAGE"></span><span id="default-file-storage"></span><span id="std:setting-DEFAULT_FILE_STORAGE"></span><h3>DEFAULT_FILE_STORAGE<a class="headerlink" href="#default-file-storage" title="Permalink to this headline">¶</a></h3>
<p>Default: <a class="reference internal" href="files/storage.html#django.core.files.storage.FileSystemStorage" title="django.core.files.storage.FileSystemStorage"><tt class="xref py py-class docutils literal"><span class="pre">django.core.files.storage.FileSystemStorage</span></tt></a></p>
<p>Default file storage class to be used for any file-related operations that don&#8217;t
specify a particular storage system. See <a class="reference internal" href="../topics/files.html"><em>Managing files</em></a>.</p>
</div>
<div class="section" id="s-default-from-email">
<span id="s-std:setting-DEFAULT_FROM_EMAIL"></span><span id="default-from-email"></span><span id="std:setting-DEFAULT_FROM_EMAIL"></span><h3>DEFAULT_FROM_EMAIL<a class="headerlink" href="#default-from-email" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'webmaster&#64;localhost'</span></tt></p>
<p>Default email address to use for various automated correspondence from the
site manager(s). This doesn&#8217;t include error messages sent to <a class="reference internal" href="#std:setting-ADMINS"><tt class="xref std std-setting docutils literal"><span class="pre">ADMINS</span></tt></a>
and <a class="reference internal" href="#std:setting-MANAGERS"><tt class="xref std std-setting docutils literal"><span class="pre">MANAGERS</span></tt></a>; for that, see <a class="reference internal" href="#std:setting-SERVER_EMAIL"><tt class="xref std std-setting docutils literal"><span class="pre">SERVER_EMAIL</span></tt></a>.</p>
</div>
<div class="section" id="s-default-index-tablespace">
<span id="s-std:setting-DEFAULT_INDEX_TABLESPACE"></span><span id="default-index-tablespace"></span><span id="std:setting-DEFAULT_INDEX_TABLESPACE"></span><h3>DEFAULT_INDEX_TABLESPACE<a class="headerlink" href="#default-index-tablespace" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Default tablespace to use for indexes on fields that don&#8217;t specify
one, if the backend supports it (see <a class="reference internal" href="../topics/db/tablespaces.html"><em>Tablespaces</em></a>).</p>
</div>
<div class="section" id="s-default-tablespace">
<span id="s-std:setting-DEFAULT_TABLESPACE"></span><span id="default-tablespace"></span><span id="std:setting-DEFAULT_TABLESPACE"></span><h3>DEFAULT_TABLESPACE<a class="headerlink" href="#default-tablespace" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Default tablespace to use for models that don&#8217;t specify one, if the
backend supports it (see <a class="reference internal" href="../topics/db/tablespaces.html"><em>Tablespaces</em></a>).</p>
</div>
<div class="section" id="s-disallowed-user-agents">
<span id="s-std:setting-DISALLOWED_USER_AGENTS"></span><span id="disallowed-user-agents"></span><span id="std:setting-DISALLOWED_USER_AGENTS"></span><h3>DISALLOWED_USER_AGENTS<a class="headerlink" href="#disallowed-user-agents" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>List of compiled regular expression objects representing User-Agent strings that
are not allowed to visit any page, systemwide. Use this for bad robots/crawlers.
This is only used if <tt class="docutils literal"><span class="pre">CommonMiddleware</span></tt> is installed (see
<a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>).</p>
</div>
<div class="section" id="s-email-backend">
<span id="s-std:setting-EMAIL_BACKEND"></span><span id="email-backend"></span><span id="std:setting-EMAIL_BACKEND"></span><h3>EMAIL_BACKEND<a class="headerlink" href="#email-backend" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.core.mail.backends.smtp.EmailBackend'</span></tt></p>
<p>The backend to use for sending emails. For the list of available backends see
<a class="reference internal" href="../topics/email.html"><em>Sending email</em></a>.</p>
</div>
<div class="section" id="s-email-file-path">
<span id="s-std:setting-EMAIL_FILE_PATH"></span><span id="email-file-path"></span><span id="std:setting-EMAIL_FILE_PATH"></span><h3>EMAIL_FILE_PATH<a class="headerlink" href="#email-file-path" title="Permalink to this headline">¶</a></h3>
<p>Default: Not defined</p>
<p>The directory used by the <tt class="docutils literal"><span class="pre">file</span></tt> email backend to store output files.</p>
</div>
<div class="section" id="s-email-host">
<span id="s-std:setting-EMAIL_HOST"></span><span id="email-host"></span><span id="std:setting-EMAIL_HOST"></span><h3>EMAIL_HOST<a class="headerlink" href="#email-host" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'localhost'</span></tt></p>
<p>The host to use for sending email.</p>
<p>See also <a class="reference internal" href="#std:setting-EMAIL_PORT"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_PORT</span></tt></a>.</p>
</div>
<div class="section" id="s-email-host-password">
<span id="s-std:setting-EMAIL_HOST_PASSWORD"></span><span id="email-host-password"></span><span id="std:setting-EMAIL_HOST_PASSWORD"></span><h3>EMAIL_HOST_PASSWORD<a class="headerlink" href="#email-host-password" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Password to use for the SMTP server defined in <a class="reference internal" href="#std:setting-EMAIL_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST</span></tt></a>. This
setting is used in conjunction with <a class="reference internal" href="#std:setting-EMAIL_HOST_USER"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST_USER</span></tt></a> when
authenticating to the SMTP server. If either of these settings is empty,
Django won&#8217;t attempt authentication.</p>
<p>See also <a class="reference internal" href="#std:setting-EMAIL_HOST_USER"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST_USER</span></tt></a>.</p>
</div>
<div class="section" id="s-email-host-user">
<span id="s-std:setting-EMAIL_HOST_USER"></span><span id="email-host-user"></span><span id="std:setting-EMAIL_HOST_USER"></span><h3>EMAIL_HOST_USER<a class="headerlink" href="#email-host-user" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Username to use for the SMTP server defined in <a class="reference internal" href="#std:setting-EMAIL_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST</span></tt></a>.
If empty, Django won&#8217;t attempt authentication.</p>
<p>See also <a class="reference internal" href="#std:setting-EMAIL_HOST_PASSWORD"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST_PASSWORD</span></tt></a>.</p>
</div>
<div class="section" id="s-email-port">
<span id="s-std:setting-EMAIL_PORT"></span><span id="email-port"></span><span id="std:setting-EMAIL_PORT"></span><h3>EMAIL_PORT<a class="headerlink" href="#email-port" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">25</span></tt></p>
<p>Port to use for the SMTP server defined in <a class="reference internal" href="#std:setting-EMAIL_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST</span></tt></a>.</p>
</div>
<div class="section" id="s-email-subject-prefix">
<span id="s-std:setting-EMAIL_SUBJECT_PREFIX"></span><span id="email-subject-prefix"></span><span id="std:setting-EMAIL_SUBJECT_PREFIX"></span><h3>EMAIL_SUBJECT_PREFIX<a class="headerlink" href="#email-subject-prefix" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'[Django]</span> <span class="pre">'</span></tt></p>
<p>Subject-line prefix for email messages sent with <tt class="docutils literal"><span class="pre">django.core.mail.mail_admins</span></tt>
or <tt class="docutils literal"><span class="pre">django.core.mail.mail_managers</span></tt>. You&#8217;ll probably want to include the
trailing space.</p>
</div>
<div class="section" id="s-email-use-tls">
<span id="s-std:setting-EMAIL_USE_TLS"></span><span id="email-use-tls"></span><span id="std:setting-EMAIL_USE_TLS"></span><h3>EMAIL_USE_TLS<a class="headerlink" href="#email-use-tls" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to use a TLS (secure) connection when talking to the SMTP server.
This is used for explicit TLS connections, generally on port 587. If you are
experiencing hanging connections, see the implicit TLS setting
<a class="reference internal" href="#std:setting-EMAIL_USE_SSL"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_USE_SSL</span></tt></a>.</p>
</div>
<div class="section" id="s-email-use-ssl">
<span id="s-std:setting-EMAIL_USE_SSL"></span><span id="email-use-ssl"></span><span id="std:setting-EMAIL_USE_SSL"></span><h3>EMAIL_USE_SSL<a class="headerlink" href="#email-use-ssl" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to use an implicit TLS (secure) connection when talking to the SMTP
server. In most email documentation this type of TLS connection is referred
to as SSL. It is generally used on port 465. If you are experiencing problems,
see the explicit TLS setting <a class="reference internal" href="#std:setting-EMAIL_USE_TLS"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_USE_TLS</span></tt></a>.</p>
<p>Note that <a class="reference internal" href="#std:setting-EMAIL_USE_TLS"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_USE_TLS</span></tt></a>/<a class="reference internal" href="#std:setting-EMAIL_USE_SSL"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_USE_SSL</span></tt></a> are mutually
exclusive, so only set one of those settings to <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
</div>
<div class="section" id="s-file-charset">
<span id="s-std:setting-FILE_CHARSET"></span><span id="file-charset"></span><span id="std:setting-FILE_CHARSET"></span><h3>FILE_CHARSET<a class="headerlink" href="#file-charset" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'utf-8'</span></tt></p>
<p>The character encoding used to decode any files read from disk. This includes
template files and initial SQL data files.</p>
</div>
<div class="section" id="s-file-upload-handlers">
<span id="s-std:setting-FILE_UPLOAD_HANDLERS"></span><span id="file-upload-handlers"></span><span id="std:setting-FILE_UPLOAD_HANDLERS"></span><h3>FILE_UPLOAD_HANDLERS<a class="headerlink" href="#file-upload-handlers" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&quot;django.core.files.uploadhandler.MemoryFileUploadHandler&quot;</span><span class="p">,</span>
 <span class="s">&quot;django.core.files.uploadhandler.TemporaryFileUploadHandler&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>A tuple of handlers to use for uploading. Changing this setting allows complete
customization &#8211; even replacement &#8211; of Django&#8217;s upload process.</p>
<p>See <a class="reference internal" href="../topics/files.html"><em>Managing files</em></a> for details.</p>
</div>
<div class="section" id="s-file-upload-max-memory-size">
<span id="s-std:setting-FILE_UPLOAD_MAX_MEMORY_SIZE"></span><span id="file-upload-max-memory-size"></span><span id="std:setting-FILE_UPLOAD_MAX_MEMORY_SIZE"></span><h3>FILE_UPLOAD_MAX_MEMORY_SIZE<a class="headerlink" href="#file-upload-max-memory-size" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">2621440</span></tt> (i.e. 2.5 MB).</p>
<p>The maximum size (in bytes) that an upload will be before it gets streamed to
the file system. See <a class="reference internal" href="../topics/files.html"><em>Managing files</em></a> for details.</p>
</div>
<div class="section" id="s-file-upload-directory-permissions">
<span id="s-std:setting-FILE_UPLOAD_DIRECTORY_PERMISSIONS"></span><span id="file-upload-directory-permissions"></span><span id="std:setting-FILE_UPLOAD_DIRECTORY_PERMISSIONS"></span><h3>FILE_UPLOAD_DIRECTORY_PERMISSIONS<a class="headerlink" href="#file-upload-directory-permissions" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The numeric mode to apply to directories created in the process of uploading
files.</p>
<p>This setting also determines the default permissions for collected static
directories when using the <a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> management command. See
<a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> for details on overriding it.</p>
<p>This value mirrors the functionality and caveats of the
<a class="reference internal" href="#std:setting-FILE_UPLOAD_PERMISSIONS"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_PERMISSIONS</span></tt></a> setting.</p>
</div>
<div class="section" id="s-file-upload-permissions">
<span id="s-std:setting-FILE_UPLOAD_PERMISSIONS"></span><span id="file-upload-permissions"></span><span id="std:setting-FILE_UPLOAD_PERMISSIONS"></span><h3>FILE_UPLOAD_PERMISSIONS<a class="headerlink" href="#file-upload-permissions" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The numeric mode (i.e. <tt class="docutils literal"><span class="pre">0o644</span></tt>) to set newly uploaded files to. For
more information about what these modes mean, see the documentation for
<a class="reference external" href="http://docs.python.org/3/library/os.html#os.chmod" title="(in Python v3.4)"><tt class="xref py py-func docutils literal"><span class="pre">os.chmod()</span></tt></a>.</p>
<p>If this isn&#8217;t given or is <tt class="docutils literal"><span class="pre">None</span></tt>, you&#8217;ll get operating-system
dependent behavior. On most platforms, temporary files will have a mode
of <tt class="docutils literal"><span class="pre">0o600</span></tt>, and files saved from memory will be saved using the
system&#8217;s standard umask.</p>
<p>For security reasons, these permissions aren&#8217;t applied to the temporary files
that are stored in <a class="reference internal" href="#std:setting-FILE_UPLOAD_TEMP_DIR"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_TEMP_DIR</span></tt></a>.</p>
<p>This setting also determines the default permissions for collected static files
when using the <a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> management command. See
<a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> for details on overriding it.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p><strong>Always prefix the mode with a 0.</strong></p>
<p class="last">If you&#8217;re not familiar with file modes, please note that the leading
<tt class="docutils literal"><span class="pre">0</span></tt> is very important: it indicates an octal number, which is the
way that modes must be specified. If you try to use <tt class="docutils literal"><span class="pre">644</span></tt>, you&#8217;ll
get totally incorrect behavior.</p>
</div>
</div>
<div class="section" id="s-file-upload-temp-dir">
<span id="s-std:setting-FILE_UPLOAD_TEMP_DIR"></span><span id="file-upload-temp-dir"></span><span id="std:setting-FILE_UPLOAD_TEMP_DIR"></span><h3>FILE_UPLOAD_TEMP_DIR<a class="headerlink" href="#file-upload-temp-dir" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The directory to store data (typically files larger than
<a class="reference internal" href="#std:setting-FILE_UPLOAD_MAX_MEMORY_SIZE"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_MAX_MEMORY_SIZE</span></tt></a>) temporarily while uploading files.
If <tt class="docutils literal"><span class="pre">None</span></tt>, Django will use the standard temporary directory for the operating
system. For example, this will default to <tt class="docutils literal"><span class="pre">/tmp</span></tt> on *nix-style operating
systems.</p>
<p>See <a class="reference internal" href="../topics/files.html"><em>Managing files</em></a> for details.</p>
</div>
<div class="section" id="s-first-day-of-week">
<span id="s-std:setting-FIRST_DAY_OF_WEEK"></span><span id="first-day-of-week"></span><span id="std:setting-FIRST_DAY_OF_WEEK"></span><h3>FIRST_DAY_OF_WEEK<a class="headerlink" href="#first-day-of-week" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">0</span></tt> (Sunday)</p>
<p>Number representing the first day of the week. This is especially useful
when displaying a calendar. This value is only used when not using
format internationalization, or when a format cannot be found for the
current locale.</p>
<p>The value must be an integer from 0 to 6, where 0 means Sunday, 1 means
Monday and so on.</p>
</div>
<div class="section" id="s-fixture-dirs">
<span id="s-std:setting-FIXTURE_DIRS"></span><span id="fixture-dirs"></span><span id="std:setting-FIXTURE_DIRS"></span><h3>FIXTURE_DIRS<a class="headerlink" href="#fixture-dirs" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>List of directories searched for fixture files, in addition to the
<tt class="docutils literal"><span class="pre">fixtures</span></tt> directory of each application, in search order.</p>
<p>Note that these paths should use Unix-style forward slashes, even on Windows.</p>
<p>See <a class="reference internal" href="../howto/initial-data.html#id1"><em>Providing initial data with fixtures</em></a> and <a class="reference internal" href="../topics/testing/tools.html#topics-testing-fixtures"><em>Fixture loading</em></a>.</p>
</div>
<div class="section" id="s-force-script-name">
<span id="s-std:setting-FORCE_SCRIPT_NAME"></span><span id="force-script-name"></span><span id="std:setting-FORCE_SCRIPT_NAME"></span><h3>FORCE_SCRIPT_NAME<a class="headerlink" href="#force-script-name" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>If not <tt class="docutils literal"><span class="pre">None</span></tt>, this will be used as the value of the <tt class="docutils literal"><span class="pre">SCRIPT_NAME</span></tt>
environment variable in any HTTP request. This setting can be used to override
the server-provided value of <tt class="docutils literal"><span class="pre">SCRIPT_NAME</span></tt>, which may be a rewritten version
of the preferred value or not supplied at all.</p>
</div>
<div class="section" id="s-format-module-path">
<span id="s-std:setting-FORMAT_MODULE_PATH"></span><span id="format-module-path"></span><span id="std:setting-FORMAT_MODULE_PATH"></span><h3>FORMAT_MODULE_PATH<a class="headerlink" href="#format-module-path" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>A full Python path to a Python package that contains format definitions for
project locales. If not <tt class="docutils literal"><span class="pre">None</span></tt>, Django will check for a <tt class="docutils literal"><span class="pre">formats.py</span></tt>
file, under the directory named as the current locale, and will use the
formats defined on this file.</p>
<p>For example, if <a class="reference internal" href="#std:setting-FORMAT_MODULE_PATH"><tt class="xref std std-setting docutils literal"><span class="pre">FORMAT_MODULE_PATH</span></tt></a> is set to <tt class="docutils literal"><span class="pre">mysite.formats</span></tt>,
and current language is <tt class="docutils literal"><span class="pre">en</span></tt> (English), Django will expect a directory tree
like:</p>
<div class="highlight-python"><div class="highlight"><pre>mysite/
    formats/
        __init__.py
        en/
            __init__.py
            formats.py
</pre></div>
</div>
<p>Available formats are <a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-TIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_FORMAT</span></tt></a>,
<a class="reference internal" href="#std:setting-DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-YEAR_MONTH_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">YEAR_MONTH_FORMAT</span></tt></a>,
<a class="reference internal" href="#std:setting-MONTH_DAY_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">MONTH_DAY_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-SHORT_DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATE_FORMAT</span></tt></a>,
<a class="reference internal" href="#std:setting-SHORT_DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATETIME_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-FIRST_DAY_OF_WEEK"><tt class="xref std std-setting docutils literal"><span class="pre">FIRST_DAY_OF_WEEK</span></tt></a>,
<a class="reference internal" href="#std:setting-DECIMAL_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">DECIMAL_SEPARATOR</span></tt></a>, <a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a> and
<a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a>.</p>
</div>
<div class="section" id="s-ignorable-404-urls">
<span id="s-std:setting-IGNORABLE_404_URLS"></span><span id="ignorable-404-urls"></span><span id="std:setting-IGNORABLE_404_URLS"></span><h3>IGNORABLE_404_URLS<a class="headerlink" href="#ignorable-404-urls" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt></p>
<p>List of compiled regular expression objects describing URLs that should be
ignored when reporting HTTP 404 errors via email (see
<a class="reference internal" href="../howto/error-reporting.html"><em>Error reporting</em></a>). Regular expressions are matched against
<a class="reference internal" href="request-response.html#django.http.HttpRequest.get_full_path" title="django.http.HttpRequest.get_full_path"><tt class="xref py py-meth docutils literal"><span class="pre">request's</span> <span class="pre">full</span> <span class="pre">paths</span></tt></a> (including
query string, if any). Use this if your site does not provide a commonly
requested file such as <tt class="docutils literal"><span class="pre">favicon.ico</span></tt> or <tt class="docutils literal"><span class="pre">robots.txt</span></tt>, or if it gets
hammered by script kiddies.</p>
<p>This is only used if
<a class="reference internal" href="middleware.html#django.middleware.common.BrokenLinkEmailsMiddleware" title="django.middleware.common.BrokenLinkEmailsMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">BrokenLinkEmailsMiddleware</span></tt></a> is enabled (see
<a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>).</p>
</div>
<div class="section" id="s-installed-apps">
<span id="s-std:setting-INSTALLED_APPS"></span><span id="installed-apps"></span><span id="std:setting-INSTALLED_APPS"></span><h3>INSTALLED_APPS<a class="headerlink" href="#installed-apps" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple of strings designating all applications that are enabled in this
Django installation. Each string should be a dotted Python path to:</p>
<ul class="simple">
<li>an application configuration class, or</li>
<li>a package containing a application.</li>
</ul>
<p><a class="reference internal" href="applications.html"><em>Learn more about application configurations</em></a>.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.7:</span> <p><a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a> now supports application configurations.</p>
</div>
<div class="admonition-use-the-application-registry-for-introspection admonition">
<p class="first admonition-title">Use the application registry for introspection</p>
<p class="last">Your code should never access <a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a> directly. Use
<a class="reference internal" href="applications.html#django.apps.apps" title="django.apps.apps"><tt class="xref py py-attr docutils literal"><span class="pre">django.apps.apps</span></tt></a> instead.</p>
</div>
<div class="admonition-application-names-and-labels-must-be-unique-in-setting-installed-apps admonition">
<p class="first admonition-title">Application names and labels must be unique in
            <a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a></p>
<p>Application <a class="reference internal" href="applications.html#django.apps.AppConfig.name" title="django.apps.AppConfig.name"><tt class="xref py py-attr docutils literal"><span class="pre">names</span></tt></a> — the dotted Python
path to the application package — must be unique. There is no way to
include the same application twice, short of duplicating its code under
another name.</p>
<p>Application <a class="reference internal" href="applications.html#django.apps.AppConfig.label" title="django.apps.AppConfig.label"><tt class="xref py py-attr docutils literal"><span class="pre">labels</span></tt></a> — by default the
final part of the name — must be unique too. For example, you can&#8217;t
include both <tt class="docutils literal"><span class="pre">django.contrib.auth</span></tt> and <tt class="docutils literal"><span class="pre">myproject.auth</span></tt>. However, you
can relabel an application with a custom configuration that defines a
different <a class="reference internal" href="applications.html#django.apps.AppConfig.label" title="django.apps.AppConfig.label"><tt class="xref py py-attr docutils literal"><span class="pre">label</span></tt></a>.</p>
<p class="last">These rules apply regardless of whether <a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a>
references application configuration classes on application packages.</p>
</div>
<p>When several applications provide different versions of the same resource
(template, static file, management command, translation), the application
listed first in <a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a> has precedence.</p>
</div>
<div class="section" id="s-internal-ips">
<span id="s-std:setting-INTERNAL_IPS"></span><span id="internal-ips"></span><span id="std:setting-INTERNAL_IPS"></span><h3>INTERNAL_IPS<a class="headerlink" href="#internal-ips" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple of IP addresses, as strings, that:</p>
<ul class="simple">
<li>See debug comments, when <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt></li>
<li>Receive X headers in admindocs if the <tt class="docutils literal"><span class="pre">XViewMiddleware</span></tt> is installed (see
<a class="reference internal" href="contrib/admin/admindocs.html"><em>The Django admin documentation generator</em></a>)</li>
</ul>
</div>
<div class="section" id="s-language-code">
<span id="s-std:setting-LANGUAGE_CODE"></span><span id="language-code"></span><span id="std:setting-LANGUAGE_CODE"></span><h3>LANGUAGE_CODE<a class="headerlink" href="#language-code" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'en-us'</span></tt></p>
<p>A string representing the language code for this installation. This should be in
standard <a class="reference internal" href="../topics/i18n/index.html#term-language-code"><em class="xref std std-term">language ID format</em></a>. For example, U.S. English
is <tt class="docutils literal"><span class="pre">&quot;en-us&quot;</span></tt>. See also the <a class="reference external" href="http://www.i18nguy.com/unicode/language-identifiers.html">list of language identifiers</a> and
<a class="reference internal" href="../topics/i18n/index.html"><em>Internationalization and localization</em></a>.</p>
<p><a class="reference internal" href="#std:setting-USE_I18N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_I18N</span></tt></a> must be active for this setting to have any effect.</p>
<p>It serves two purposes:</p>
<ul class="simple">
<li>If the locale middleware isn&#8217;t in use, it decides which translation is served
to all users.</li>
<li>If the locale middleware is active, it provides a fallback language in case
the user&#8217;s preferred language can&#8217;t be determined or is not supported by the
Web site.</li>
</ul>
<p>See <a class="reference internal" href="../topics/i18n/translation.html#how-django-discovers-language-preference"><em>How Django discovers language preference</em></a> for more details.</p>
</div>
<div class="section" id="s-language-cookie-age">
<span id="s-std:setting-LANGUAGE_COOKIE_AGE"></span><span id="language-cookie-age"></span><span id="std:setting-LANGUAGE_COOKIE_AGE"></span><h3>LANGUAGE_COOKIE_AGE<a class="headerlink" href="#language-cookie-age" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt> (expires at browser close)</p>
<p>The age of the language cookie, in seconds.</p>
</div>
<div class="section" id="s-language-cookie-domain">
<span id="s-std:setting-LANGUAGE_COOKIE_DOMAIN"></span><span id="language-cookie-domain"></span><span id="std:setting-LANGUAGE_COOKIE_DOMAIN"></span><h3>LANGUAGE_COOKIE_DOMAIN<a class="headerlink" href="#language-cookie-domain" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The domain to use for the language cookie. Set this to a string such as
<tt class="docutils literal"><span class="pre">&quot;.example.com&quot;</span></tt> (note the leading dot!) for cross-domain cookies, or use
<tt class="docutils literal"><span class="pre">None</span></tt> for a standard domain cookie.</p>
<p>Be cautious when updating this setting on a production site. If you update
this setting to enable cross-domain cookies on a site that previously used
standard domain cookies, existing user cookies that have the old domain
will not be updated. This will result in site users being unable to switch
the language as long as these cookies persist. The only safe and reliable
option to perform the switch is to change the language cookie name
permanently (via the <a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_NAME</span></tt></a> setting) and to add
a middleware that copies the value from the old cookie to a new one and then
deletes the old one.</p>
</div>
<div class="section" id="s-language-cookie-name">
<span id="s-std:setting-LANGUAGE_COOKIE_NAME"></span><span id="language-cookie-name"></span><span id="std:setting-LANGUAGE_COOKIE_NAME"></span><h3>LANGUAGE_COOKIE_NAME<a class="headerlink" href="#language-cookie-name" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django_language'</span></tt></p>
<p>The name of the cookie to use for the language cookie. This can be whatever
you want (but should be different from <a class="reference internal" href="#std:setting-SESSION_COOKIE_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">SESSION_COOKIE_NAME</span></tt></a>). See
<a class="reference internal" href="../topics/i18n/index.html"><em>Internationalization and localization</em></a>.</p>
</div>
<div class="section" id="s-language-cookie-path">
<span id="s-std:setting-LANGUAGE_COOKIE_PATH"></span><span id="language-cookie-path"></span><span id="std:setting-LANGUAGE_COOKIE_PATH"></span><h3>LANGUAGE_COOKIE_PATH<a class="headerlink" href="#language-cookie-path" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">/</span></tt></p>
<p>The path set on the language cookie. This should either match the URL path of your
Django installation or be a parent of that path.</p>
<p>This is useful if you have multiple Django instances running under the same
hostname. They can use different cookie paths and each instance will only see
its own language cookie.</p>
<p>Be cautious when updating this setting on a production site. If you update this
setting to use a deeper path than it previously used, existing user cookies that
have the old path will not be updated. This will result in site users being
unable to switch the language as long as these cookies persist. The only safe
and reliable option to perform the switch is to change the language cookie name
permanently (via the <a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_NAME</span></tt></a> setting), and to add
a middleware that copies the value from the old cookie to a new one and then
deletes the one.</p>
</div>
<div class="section" id="s-languages">
<span id="s-std:setting-LANGUAGES"></span><span id="languages"></span><span id="std:setting-LANGUAGES"></span><h3>LANGUAGES<a class="headerlink" href="#languages" title="Permalink to this headline">¶</a></h3>
<p>Default: A tuple of all available languages. This list is continually growing
and including a copy here would inevitably become rapidly out of date. You can
see the current list of translated languages by looking in
<tt class="docutils literal"><span class="pre">django/conf/global_settings.py</span></tt> (or view the <a class="reference external" href="https://github.com/django/django/blob/master/django/conf/global_settings.py">online source</a>).</p>
<p>The list is a tuple of two-tuples in the format
(<a class="reference internal" href="../topics/i18n/index.html#term-language-code"><em class="xref std std-term">language code</em></a>, <tt class="docutils literal"><span class="pre">language</span> <span class="pre">name</span></tt>) &#8211; for example,
<tt class="docutils literal"><span class="pre">('ja',</span> <span class="pre">'Japanese')</span></tt>.
This specifies which languages are available for language selection. See
<a class="reference internal" href="../topics/i18n/index.html"><em>Internationalization and localization</em></a>.</p>
<p>Generally, the default value should suffice. Only set this setting if you want
to restrict language selection to a subset of the Django-provided languages.</p>
<p>If you define a custom <a class="reference internal" href="#std:setting-LANGUAGES"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGES</span></tt></a> setting, you can mark the
language names as translation strings using the
<a class="reference internal" href="utils.html#django.utils.translation.ugettext_lazy" title="django.utils.translation.ugettext_lazy"><tt class="xref py py-func docutils literal"><span class="pre">ugettext_lazy()</span></tt></a> function.</p>
<p>Here&#8217;s a sample settings file:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.utils.translation</span> <span class="kn">import</span> <span class="n">ugettext_lazy</span> <span class="k">as</span> <span class="n">_</span>

<span class="n">LANGUAGES</span> <span class="o">=</span> <span class="p">(</span>
    <span class="p">(</span><span class="s">&#39;de&#39;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&#39;German&#39;</span><span class="p">)),</span>
    <span class="p">(</span><span class="s">&#39;en&#39;</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s">&#39;English&#39;</span><span class="p">)),</span>
<span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="s-locale-paths">
<span id="s-std:setting-LOCALE_PATHS"></span><span id="locale-paths"></span><span id="std:setting-LOCALE_PATHS"></span><h3>LOCALE_PATHS<a class="headerlink" href="#locale-paths" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple of directories where Django looks for translation files.
See <a class="reference internal" href="../topics/i18n/translation.html#how-django-discovers-translations"><em>How Django discovers translations</em></a>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">LOCALE_PATHS</span> <span class="o">=</span> <span class="p">(</span>
    <span class="s">&#39;/home/www/project/common_files/locale&#39;</span><span class="p">,</span>
    <span class="s">&#39;/var/local/translations/locale&#39;</span><span class="p">,</span>
<span class="p">)</span>
</pre></div>
</div>
<p>Django will look within each of these paths for the <tt class="docutils literal"><span class="pre">&lt;locale_code&gt;/LC_MESSAGES</span></tt>
directories containing the actual translation files.</p>
</div>
<div class="section" id="s-logging">
<span id="s-std:setting-LOGGING"></span><span id="logging"></span><span id="std:setting-LOGGING"></span><h3>LOGGING<a class="headerlink" href="#logging" title="Permalink to this headline">¶</a></h3>
<p>Default: A logging configuration dictionary.</p>
<p>A data structure containing configuration information. The contents of
this data structure will be passed as the argument to the
configuration method described in <a class="reference internal" href="#std:setting-LOGGING_CONFIG"><tt class="xref std std-setting docutils literal"><span class="pre">LOGGING_CONFIG</span></tt></a>.</p>
<p>Among other things, the default logging configuration passes HTTP 500 server
errors to an email log handler when <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> is <tt class="docutils literal"><span class="pre">False</span></tt>. See also
<a class="reference internal" href="../topics/logging.html#configuring-logging"><em>Configuring logging</em></a>.</p>
<p>You can see the default logging configuration by looking in
<tt class="docutils literal"><span class="pre">django/utils/log.py</span></tt> (or view the <a class="reference external" href="https://github.com/django/django/blob/master/django/utils/log.py">online source</a>).</p>
</div>
<div class="section" id="s-logging-config">
<span id="s-std:setting-LOGGING_CONFIG"></span><span id="logging-config"></span><span id="std:setting-LOGGING_CONFIG"></span><h3>LOGGING_CONFIG<a class="headerlink" href="#logging-config" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'logging.config.dictConfig'</span></tt></p>
<p>A path to a callable that will be used to configure logging in the
Django project. Points at a instance of Python&#8217;s <a class="reference external" href="http://docs.python.org/library/logging.config.html#configuration-dictionary-schema">dictConfig</a>
configuration method by default.</p>
<p>If you set <a class="reference internal" href="#std:setting-LOGGING_CONFIG"><tt class="xref std std-setting docutils literal"><span class="pre">LOGGING_CONFIG</span></tt></a> to <tt class="docutils literal"><span class="pre">None</span></tt>, the logging
configuration process will be skipped.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.7:</span> <p>Previously, the default value was <tt class="docutils literal"><span class="pre">'django.utils.log.dictConfig'</span></tt>.</p>
</div>
</div>
<div class="section" id="s-managers">
<span id="s-std:setting-MANAGERS"></span><span id="managers"></span><span id="std:setting-MANAGERS"></span><h3>MANAGERS<a class="headerlink" href="#managers" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple in the same format as <a class="reference internal" href="#std:setting-ADMINS"><tt class="xref std std-setting docutils literal"><span class="pre">ADMINS</span></tt></a> that specifies who should get
broken link notifications when
<a class="reference internal" href="middleware.html#django.middleware.common.BrokenLinkEmailsMiddleware" title="django.middleware.common.BrokenLinkEmailsMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">BrokenLinkEmailsMiddleware</span></tt></a> is enabled.</p>
</div>
<div class="section" id="s-media-root">
<span id="s-std:setting-MEDIA_ROOT"></span><span id="media-root"></span><span id="std:setting-MEDIA_ROOT"></span><h3>MEDIA_ROOT<a class="headerlink" href="#media-root" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Absolute filesystem path to the directory that will hold <a class="reference internal" href="../topics/files.html"><em>user-uploaded
files</em></a>.</p>
<p>Example: <tt class="docutils literal"><span class="pre">&quot;/var/www/example.com/media/&quot;</span></tt></p>
<p>See also <a class="reference internal" href="#std:setting-MEDIA_URL"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_URL</span></tt></a>.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last"><a class="reference internal" href="#std:setting-MEDIA_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_ROOT</span></tt></a> and <a class="reference internal" href="#std:setting-STATIC_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">STATIC_ROOT</span></tt></a> must have different
values. Before <a class="reference internal" href="#std:setting-STATIC_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">STATIC_ROOT</span></tt></a> was introduced, it was common to
rely or fallback on <a class="reference internal" href="#std:setting-MEDIA_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_ROOT</span></tt></a> to also serve static files;
however, since this can have serious security implications, there is a
validation check to prevent it.</p>
</div>
</div>
<div class="section" id="s-media-url">
<span id="s-std:setting-MEDIA_URL"></span><span id="media-url"></span><span id="std:setting-MEDIA_URL"></span><h3>MEDIA_URL<a class="headerlink" href="#media-url" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>URL that handles the media served from <a class="reference internal" href="#std:setting-MEDIA_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_ROOT</span></tt></a>, used
for <a class="reference internal" href="../topics/files.html"><em>managing stored files</em></a>. It must end in a slash if set
to a non-empty value. You will need to <a class="reference internal" href="../howto/static-files/index.html#serving-uploaded-files-in-development"><em>configure these files to be served</em></a> in both development and production.</p>
<p>In order to use <tt class="docutils literal"><span class="pre">{{</span> <span class="pre">MEDIA_URL</span> <span class="pre">}}</span></tt> in your templates, you must have
<tt class="docutils literal"><span class="pre">'django.core.context_processors.media'</span></tt> in your
<a class="reference internal" href="#std:setting-TEMPLATE_CONTEXT_PROCESSORS"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_CONTEXT_PROCESSORS</span></tt></a>. It&#8217;s there by default, but be sure
to include it if you override that setting and want this behavior.</p>
<p>Example: <tt class="docutils literal"><span class="pre">&quot;http://media.example.com/&quot;</span></tt></p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">There are security risks if you are accepting uploaded content from
untrusted users! See the security guide&#8217;s topic on
<a class="reference internal" href="../topics/security.html#user-uploaded-content-security"><em>User-uploaded content</em></a> for mitigation details.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last"><a class="reference internal" href="#std:setting-MEDIA_URL"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_URL</span></tt></a> and <a class="reference internal" href="#std:setting-STATIC_URL"><tt class="xref std std-setting docutils literal"><span class="pre">STATIC_URL</span></tt></a> must have different
values. See <a class="reference internal" href="#std:setting-MEDIA_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_ROOT</span></tt></a> for more details.</p>
</div>
</div>
<div class="section" id="s-middleware-classes">
<span id="s-std:setting-MIDDLEWARE_CLASSES"></span><span id="middleware-classes"></span><span id="std:setting-MIDDLEWARE_CLASSES"></span><h3>MIDDLEWARE_CLASSES<a class="headerlink" href="#middleware-classes" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&#39;django.middleware.common.CommonMiddleware&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.middleware.csrf.CsrfViewMiddleware&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>A tuple of middleware classes to use. See <a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.7:</span> <p><a class="reference internal" href="middleware.html#django.contrib.sessions.middleware.SessionMiddleware" title="django.contrib.sessions.middleware.SessionMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">SessionMiddleware</span></tt></a>,
<a class="reference internal" href="middleware.html#django.contrib.auth.middleware.AuthenticationMiddleware" title="django.contrib.auth.middleware.AuthenticationMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">AuthenticationMiddleware</span></tt></a>, and
<a class="reference internal" href="middleware.html#django.contrib.messages.middleware.MessageMiddleware" title="django.contrib.messages.middleware.MessageMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">MessageMiddleware</span></tt></a> were removed
from this setting.</p>
</div>
</div>
<div class="section" id="s-migration-modules">
<span id="s-std:setting-MIGRATION_MODULES"></span><span id="migration-modules"></span><span id="std:setting-MIGRATION_MODULES"></span><h3>MIGRATION_MODULES<a class="headerlink" href="#migration-modules" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{}</span>  <span class="c"># empty dictionary</span>
</pre></div>
</div>
<p>A dictionary specifying the package where migration modules can be found on a per-app basis. The default value
of this setting is an empty dictionary, but the default package name for migration modules is <tt class="docutils literal"><span class="pre">migrations</span></tt>.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span><span class="s">&#39;blog&#39;</span><span class="p">:</span> <span class="s">&#39;blog.db_migrations&#39;</span><span class="p">}</span>
</pre></div>
</div>
<p>In this case, migrations pertaining to the <tt class="docutils literal"><span class="pre">blog</span></tt> app will be contained in the <tt class="docutils literal"><span class="pre">blog.db_migrations</span></tt> package.</p>
<p>If you provide the <tt class="docutils literal"><span class="pre">app_label</span></tt> argument, <a class="reference internal" href="django-admin.html#django-admin-makemigrations"><tt class="xref std std-djadmin docutils literal"><span class="pre">makemigrations</span></tt></a> will
automatically create the package if it doesn&#8217;t already exist.</p>
</div>
<div class="section" id="s-month-day-format">
<span id="s-std:setting-MONTH_DAY_FORMAT"></span><span id="month-day-format"></span><span id="std:setting-MONTH_DAY_FORMAT"></span><h3>MONTH_DAY_FORMAT<a class="headerlink" href="#month-day-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'F</span> <span class="pre">j'</span></tt></p>
<p>The default formatting to use for date fields on Django admin change-list
pages &#8211; and, possibly, by other parts of the system &#8211; in cases when only the
month and day are displayed.</p>
<p>For example, when a Django admin change-list page is being filtered by a date
drilldown, the header for a given day displays the day and month. Different
locales have different formats. For example, U.S. English would say
&#8220;January 1,&#8221; whereas Spanish might say &#8220;1 Enero.&#8221;</p>
<p>Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the corresponding
locale-dictated format has higher precedence and will be applied.</p>
<p>See <a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>. See also
<a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_FORMAT</span></tt></a>,
<a class="reference internal" href="#std:setting-TIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_FORMAT</span></tt></a> and <a class="reference internal" href="#std:setting-YEAR_MONTH_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">YEAR_MONTH_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-number-grouping">
<span id="s-std:setting-NUMBER_GROUPING"></span><span id="number-grouping"></span><span id="std:setting-NUMBER_GROUPING"></span><h3>NUMBER_GROUPING<a class="headerlink" href="#number-grouping" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">0</span></tt></p>
<p>Number of digits grouped together on the integer part of a number.</p>
<p>Common use is to display a thousand separator. If this setting is <tt class="docutils literal"><span class="pre">0</span></tt>, then
no grouping will be applied to the number. If this setting is greater than
<tt class="docutils literal"><span class="pre">0</span></tt>, then <a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a> will be used as the separator between
those groups.</p>
<p>Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the locale-dictated
format has higher precedence and will be applied instead.</p>
<p>See also <a class="reference internal" href="#std:setting-DECIMAL_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">DECIMAL_SEPARATOR</span></tt></a>, <a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a> and
<a class="reference internal" href="#std:setting-USE_THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">USE_THOUSAND_SEPARATOR</span></tt></a>.</p>
</div>
<div class="section" id="s-prepend-www">
<span id="s-std:setting-PREPEND_WWW"></span><span id="prepend-www"></span><span id="std:setting-PREPEND_WWW"></span><h3>PREPEND_WWW<a class="headerlink" href="#prepend-www" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to prepend the &#8220;www.&#8221; subdomain to URLs that don&#8217;t have it. This is only
used if <a class="reference internal" href="middleware.html#django.middleware.common.CommonMiddleware" title="django.middleware.common.CommonMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">CommonMiddleware</span></tt></a> is installed
(see <a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>). See also <a class="reference internal" href="#std:setting-APPEND_SLASH"><tt class="xref std std-setting docutils literal"><span class="pre">APPEND_SLASH</span></tt></a>.</p>
</div>
<div class="section" id="s-root-urlconf">
<span id="s-std:setting-ROOT_URLCONF"></span><span id="root-urlconf"></span><span id="std:setting-ROOT_URLCONF"></span><h3>ROOT_URLCONF<a class="headerlink" href="#root-urlconf" title="Permalink to this headline">¶</a></h3>
<p>Default: Not defined</p>
<p>A string representing the full Python import path to your root URLconf. For example:
<tt class="docutils literal"><span class="pre">&quot;mydjangoapps.urls&quot;</span></tt>. Can be overridden on a per-request basis by
setting the attribute <tt class="docutils literal"><span class="pre">urlconf</span></tt> on the incoming <tt class="docutils literal"><span class="pre">HttpRequest</span></tt>
object. See <a class="reference internal" href="../topics/http/urls.html#how-django-processes-a-request"><em>How Django processes a request</em></a> for details.</p>
</div>
<div class="section" id="s-secret-key">
<span id="s-std:setting-SECRET_KEY"></span><span id="secret-key"></span><span id="std:setting-SECRET_KEY"></span><h3>SECRET_KEY<a class="headerlink" href="#secret-key" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>A secret key for a particular Django installation. This is used to provide
<a class="reference internal" href="../topics/signing.html"><em>cryptographic signing</em></a>, and should be set to a unique,
unpredictable value.</p>
<p><a class="reference internal" href="django-admin.html#django-admin-startproject"><tt class="xref std std-djadmin docutils literal"><span class="pre">django-admin.py</span> <span class="pre">startproject</span></tt></a> automatically adds a
randomly-generated <tt class="docutils literal"><span class="pre">SECRET_KEY</span></tt> to each new project.</p>
<p>Django will refuse to start if <a class="reference internal" href="#std:setting-SECRET_KEY"><tt class="xref std std-setting docutils literal"><span class="pre">SECRET_KEY</span></tt></a> is not set.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p><strong>Keep this value secret.</strong></p>
<p class="last">Running Django with a known <a class="reference internal" href="#std:setting-SECRET_KEY"><tt class="xref std std-setting docutils literal"><span class="pre">SECRET_KEY</span></tt></a> defeats many of Django&#8217;s
security protections, and can lead to privilege escalation and remote code
execution vulnerabilities.</p>
</div>
<p>The secret key is used for:</p>
<ul class="simple">
<li>All <a class="reference internal" href="../topics/http/sessions.html"><em>sessions</em></a> if you are using
any other session backend than <tt class="docutils literal"><span class="pre">django.contrib.sessions.backends.cache</span></tt>,
or if you use
<a class="reference internal" href="middleware.html#django.contrib.auth.middleware.SessionAuthenticationMiddleware" title="django.contrib.auth.middleware.SessionAuthenticationMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">SessionAuthenticationMiddleware</span></tt></a>
and are using the default
<a class="reference internal" href="../topics/auth/customizing.html#django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash" title="django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash"><tt class="xref py py-meth docutils literal"><span class="pre">get_session_auth_hash()</span></tt></a>.</li>
<li>All <a class="reference internal" href="contrib/messages.html"><em>messages</em></a> if you are using
<a class="reference internal" href="contrib/messages.html#django.contrib.messages.storage.cookie.CookieStorage" title="django.contrib.messages.storage.cookie.CookieStorage"><tt class="xref py py-class docutils literal"><span class="pre">CookieStorage</span></tt></a> or
<a class="reference internal" href="contrib/messages.html#django.contrib.messages.storage.fallback.FallbackStorage" title="django.contrib.messages.storage.fallback.FallbackStorage"><tt class="xref py py-class docutils literal"><span class="pre">FallbackStorage</span></tt></a>.</li>
<li><a class="reference internal" href="contrib/formtools/form-wizard.html"><em>Form wizard</em></a> progress when using
cookie storage with
<a class="reference internal" href="contrib/formtools/form-wizard.html#django.contrib.formtools.wizard.views.CookieWizardView" title="django.contrib.formtools.wizard.views.CookieWizardView"><tt class="xref py py-class docutils literal"><span class="pre">django.contrib.formtools.wizard.views.CookieWizardView</span></tt></a>.</li>
<li>All <a class="reference internal" href="../topics/auth/default.html#django.contrib.auth.views.password_reset" title="django.contrib.auth.views.password_reset"><tt class="xref py py-func docutils literal"><span class="pre">password_reset()</span></tt></a> tokens.</li>
<li>All in progress <a class="reference internal" href="contrib/formtools/form-preview.html"><em>form previews</em></a>.</li>
<li>Any usage of <a class="reference internal" href="../topics/signing.html"><em>cryptographic signing</em></a>, unless a
different key is provided.</li>
</ul>
<p>If you rotate your secret key, all of the above will be invalidated.
Secret keys are not used for passwords of users and key rotation will not
affect them.</p>
</div>
<div class="section" id="s-secure-proxy-ssl-header">
<span id="s-std:setting-SECURE_PROXY_SSL_HEADER"></span><span id="secure-proxy-ssl-header"></span><span id="std:setting-SECURE_PROXY_SSL_HEADER"></span><h3>SECURE_PROXY_SSL_HEADER<a class="headerlink" href="#secure-proxy-ssl-header" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>A tuple representing a HTTP header/value combination that signifies a request
is secure. This controls the behavior of the request object&#8217;s <tt class="docutils literal"><span class="pre">is_secure()</span></tt>
method.</p>
<p>This takes some explanation. By default, <tt class="docutils literal"><span class="pre">is_secure()</span></tt> is able to determine
whether a request is secure by looking at whether the requested URL uses
&#8220;<a class="reference external" href="https://">https://</a>&#8221;. This is important for Django&#8217;s CSRF protection, and may be used
by your own code or third-party apps.</p>
<p>If your Django app is behind a proxy, though, the proxy may be &#8220;swallowing&#8221; the
fact that a request is HTTPS, using a non-HTTPS connection between the proxy
and Django. In this case, <tt class="docutils literal"><span class="pre">is_secure()</span></tt> would always return <tt class="docutils literal"><span class="pre">False</span></tt> &#8211; even
for requests that were made via HTTPS by the end user.</p>
<p>In this situation, you&#8217;ll want to configure your proxy to set a custom HTTP
header that tells Django whether the request came in via HTTPS, and you&#8217;ll want
to set <tt class="docutils literal"><span class="pre">SECURE_PROXY_SSL_HEADER</span></tt> so that Django knows what header to look
for.</p>
<p>You&#8217;ll need to set a tuple with two elements &#8211; the name of the header to look
for and the required value. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">SECURE_PROXY_SSL_HEADER</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;HTTP_X_FORWARDED_PROTO&#39;</span><span class="p">,</span> <span class="s">&#39;https&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>Here, we&#8217;re telling Django that we trust the <tt class="docutils literal"><span class="pre">X-Forwarded-Proto</span></tt> header
that comes from our proxy, and any time its value is <tt class="docutils literal"><span class="pre">'https'</span></tt>, then the
request is guaranteed to be secure (i.e., it originally came in via HTTPS).
Obviously, you should <em>only</em> set this setting if you control your proxy or
have some other guarantee that it sets/strips this header appropriately.</p>
<p>Note that the header needs to be in the format as used by <tt class="docutils literal"><span class="pre">request.META</span></tt> &#8211;
all caps and likely starting with <tt class="docutils literal"><span class="pre">HTTP_</span></tt>. (Remember, Django automatically
adds <tt class="docutils literal"><span class="pre">'HTTP_'</span></tt> to the start of x-header names before making the header
available in <tt class="docutils literal"><span class="pre">request.META</span></tt>.)</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p><strong>You will probably open security holes in your site if you set this
without knowing what you&#8217;re doing. And if you fail to set it when you
should. Seriously.</strong></p>
<p>Make sure ALL of the following are true before setting this (assuming the
values from the example above):</p>
<ul class="simple">
<li>Your Django app is behind a proxy.</li>
<li>Your proxy strips the <tt class="docutils literal"><span class="pre">X-Forwarded-Proto</span></tt> header from all incoming
requests. In other words, if end users include that header in their
requests, the proxy will discard it.</li>
<li>Your proxy sets the <tt class="docutils literal"><span class="pre">X-Forwarded-Proto</span></tt> header and sends it to Django,
but only for requests that originally come in via HTTPS.</li>
</ul>
<p class="last">If any of those are not true, you should keep this setting set to <tt class="docutils literal"><span class="pre">None</span></tt>
and find another way of determining HTTPS, perhaps via custom middleware.</p>
</div>
</div>
<div class="section" id="s-send-broken-link-emails">
<span id="s-std:setting-SEND_BROKEN_LINK_EMAILS"></span><span id="send-broken-link-emails"></span><span id="std:setting-SEND_BROKEN_LINK_EMAILS"></span><h3>SEND_BROKEN_LINK_EMAILS<a class="headerlink" href="#send-broken-link-emails" title="Permalink to this headline">¶</a></h3>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.6: </span>Since <a class="reference internal" href="middleware.html#django.middleware.common.BrokenLinkEmailsMiddleware" title="django.middleware.common.BrokenLinkEmailsMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">BrokenLinkEmailsMiddleware</span></tt></a>
was split from <a class="reference internal" href="middleware.html#django.middleware.common.CommonMiddleware" title="django.middleware.common.CommonMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">CommonMiddleware</span></tt></a>,
this setting no longer serves a purpose.</p>
</div>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to send an email to the <a class="reference internal" href="#std:setting-MANAGERS"><tt class="xref std std-setting docutils literal"><span class="pre">MANAGERS</span></tt></a> each time somebody visits
a Django-powered page that is 404ed with a non-empty referer (i.e., a broken
link). This is only used if <tt class="docutils literal"><span class="pre">CommonMiddleware</span></tt> is installed (see
<a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>). See also <a class="reference internal" href="#std:setting-IGNORABLE_404_URLS"><tt class="xref std std-setting docutils literal"><span class="pre">IGNORABLE_404_URLS</span></tt></a> and
<a class="reference internal" href="../howto/error-reporting.html"><em>Error reporting</em></a>.</p>
</div>
<div class="section" id="s-serialization-modules">
<span id="s-std:setting-SERIALIZATION_MODULES"></span><span id="serialization-modules"></span><span id="std:setting-SERIALIZATION_MODULES"></span><h3>SERIALIZATION_MODULES<a class="headerlink" href="#serialization-modules" title="Permalink to this headline">¶</a></h3>
<p>Default: Not defined.</p>
<p>A dictionary of modules containing serializer definitions (provided as
strings), keyed by a string identifier for that serialization type. For
example, to define a YAML serializer, use:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">SERIALIZATION_MODULES</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;yaml&#39;</span><span class="p">:</span> <span class="s">&#39;path.to.yaml_serializer&#39;</span><span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="s-server-email">
<span id="s-std:setting-SERVER_EMAIL"></span><span id="server-email"></span><span id="std:setting-SERVER_EMAIL"></span><h3>SERVER_EMAIL<a class="headerlink" href="#server-email" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'root&#64;localhost'</span></tt></p>
<p>The email address that error messages come from, such as those sent to
<a class="reference internal" href="#std:setting-ADMINS"><tt class="xref std std-setting docutils literal"><span class="pre">ADMINS</span></tt></a> and <a class="reference internal" href="#std:setting-MANAGERS"><tt class="xref std std-setting docutils literal"><span class="pre">MANAGERS</span></tt></a>.</p>
<div class="admonition-why-are-my-emails-sent-from-a-different-address admonition">
<p class="first admonition-title">Why are my emails sent from a different address?</p>
<p class="last">This address is used only for error messages. It is <em>not</em> the address that
regular email messages sent with <a class="reference internal" href="../topics/email.html#django.core.mail.send_mail" title="django.core.mail.send_mail"><tt class="xref py py-meth docutils literal"><span class="pre">send_mail()</span></tt></a>
come from; for that, see <a class="reference internal" href="#std:setting-DEFAULT_FROM_EMAIL"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_FROM_EMAIL</span></tt></a>.</p>
</div>
</div>
<div class="section" id="s-short-date-format">
<span id="s-std:setting-SHORT_DATE_FORMAT"></span><span id="short-date-format"></span><span id="std:setting-SHORT_DATE_FORMAT"></span><h3>SHORT_DATE_FORMAT<a class="headerlink" href="#short-date-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">m/d/Y</span></tt> (e.g. <tt class="docutils literal"><span class="pre">12/31/2003</span></tt>)</p>
<p>An available formatting that can be used for displaying date fields on
templates. Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the
corresponding locale-dictated format has higher precedence and will be applied.
See <a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>.</p>
<p>See also <a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a> and <a class="reference internal" href="#std:setting-SHORT_DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATETIME_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-short-datetime-format">
<span id="s-std:setting-SHORT_DATETIME_FORMAT"></span><span id="short-datetime-format"></span><span id="std:setting-SHORT_DATETIME_FORMAT"></span><h3>SHORT_DATETIME_FORMAT<a class="headerlink" href="#short-datetime-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">m/d/Y</span> <span class="pre">P</span></tt> (e.g. <tt class="docutils literal"><span class="pre">12/31/2003</span> <span class="pre">4</span> <span class="pre">p.m.</span></tt>)</p>
<p>An available formatting that can be used for displaying datetime fields on
templates. Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the
corresponding locale-dictated format has higher precedence and will be applied.
See <a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>.</p>
<p>See also <a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a> and <a class="reference internal" href="#std:setting-SHORT_DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATE_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-signing-backend">
<span id="s-std:setting-SIGNING_BACKEND"></span><span id="signing-backend"></span><span id="std:setting-SIGNING_BACKEND"></span><h3>SIGNING_BACKEND<a class="headerlink" href="#signing-backend" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.core.signing.TimestampSigner'</span></tt></p>
<p>The backend used for signing cookies and other data.</p>
<p>See also the <a class="reference internal" href="../topics/signing.html"><em>Cryptographic signing</em></a> documentation.</p>
</div>
<div class="section" id="s-silenced-system-checks">
<span id="s-std:setting-SILENCED_SYSTEM_CHECKS"></span><span id="silenced-system-checks"></span><span id="std:setting-SILENCED_SYSTEM_CHECKS"></span><h3>SILENCED_SYSTEM_CHECKS<a class="headerlink" href="#silenced-system-checks" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">[]</span></tt></p>
<p>A list of identifiers of messages generated by the system check framework
(i.e. <tt class="docutils literal"><span class="pre">[&quot;models.W001&quot;]</span></tt>) that you wish to permanently acknowledge and ignore.
Silenced warnings will no longer be output to the console; silenced errors
will still be printed, but will not prevent management commands from running.</p>
<p>See also the <a class="reference internal" href="checks.html"><em>System check framework</em></a> documentation.</p>
</div>
<div class="section" id="s-template-context-processors">
<span id="s-std:setting-TEMPLATE_CONTEXT_PROCESSORS"></span><span id="template-context-processors"></span><span id="std:setting-TEMPLATE_CONTEXT_PROCESSORS"></span><h3>TEMPLATE_CONTEXT_PROCESSORS<a class="headerlink" href="#template-context-processors" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&quot;django.contrib.auth.context_processors.auth&quot;</span><span class="p">,</span>
<span class="s">&quot;django.core.context_processors.debug&quot;</span><span class="p">,</span>
<span class="s">&quot;django.core.context_processors.i18n&quot;</span><span class="p">,</span>
<span class="s">&quot;django.core.context_processors.media&quot;</span><span class="p">,</span>
<span class="s">&quot;django.core.context_processors.static&quot;</span><span class="p">,</span>
<span class="s">&quot;django.core.context_processors.tz&quot;</span><span class="p">,</span>
<span class="s">&quot;django.contrib.messages.context_processors.messages&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>A tuple of callables that are used to populate the context in <tt class="docutils literal"><span class="pre">RequestContext</span></tt>.
These callables take a request object as their argument and return a dictionary
of items to be merged into the context.</p>
</div>
<div class="section" id="s-template-debug">
<span id="s-std:setting-TEMPLATE_DEBUG"></span><span id="template-debug"></span><span id="std:setting-TEMPLATE_DEBUG"></span><h3>TEMPLATE_DEBUG<a class="headerlink" href="#template-debug" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that turns on/off template debug mode. If this is <tt class="docutils literal"><span class="pre">True</span></tt>, the fancy
error page will display a detailed report for any exception raised during
template rendering. This report contains the relevant snippet of the template,
with the appropriate line highlighted.</p>
<p>Note that Django only displays fancy error pages if <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt>, so
you&#8217;ll want to set that to take advantage of this setting.</p>
<p>See also <a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a>.</p>
</div>
<div class="section" id="s-template-dirs">
<span id="s-std:setting-TEMPLATE_DIRS"></span><span id="template-dirs"></span><span id="std:setting-TEMPLATE_DIRS"></span><h3>TEMPLATE_DIRS<a class="headerlink" href="#template-dirs" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>List of locations of the template source files searched by
<a class="reference internal" href="templates/api.html#django.template.loaders.filesystem.Loader" title="django.template.loaders.filesystem.Loader"><tt class="xref py py-class docutils literal"><span class="pre">django.template.loaders.filesystem.Loader</span></tt></a>, in search order.</p>
<p>Note that these paths should use Unix-style forward slashes, even on Windows.</p>
<p>See <a class="reference internal" href="../topics/templates.html"><em>The Django template language</em></a>.</p>
</div>
<div class="section" id="s-template-loaders">
<span id="s-std:setting-TEMPLATE_LOADERS"></span><span id="template-loaders"></span><span id="std:setting-TEMPLATE_LOADERS"></span><h3>TEMPLATE_LOADERS<a class="headerlink" href="#template-loaders" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&#39;django.template.loaders.filesystem.Loader&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.template.loaders.app_directories.Loader&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>A tuple of template loader classes, specified as strings. Each <tt class="docutils literal"><span class="pre">Loader</span></tt> class
knows how to import templates from a particular source. Optionally, a tuple can be
used instead of a string. The first item in the tuple should be the <tt class="docutils literal"><span class="pre">Loader</span></tt>’s
module, subsequent items are passed to the <tt class="docutils literal"><span class="pre">Loader</span></tt> during initialization. See
<a class="reference internal" href="templates/api.html"><em>The Django template language: For Python programmers</em></a>.</p>
</div>
<div class="section" id="s-template-string-if-invalid">
<span id="s-std:setting-TEMPLATE_STRING_IF_INVALID"></span><span id="template-string-if-invalid"></span><span id="std:setting-TEMPLATE_STRING_IF_INVALID"></span><h3>TEMPLATE_STRING_IF_INVALID<a class="headerlink" href="#template-string-if-invalid" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">''</span></tt> (Empty string)</p>
<p>Output, as a string, that the template system should use for invalid (e.g.
misspelled) variables. See <a class="reference internal" href="templates/api.html#invalid-template-variables"><em>How invalid variables are handled</em></a>.</p>
</div>
<div class="section" id="s-test-runner">
<span id="s-std:setting-TEST_RUNNER"></span><span id="test-runner"></span><span id="std:setting-TEST_RUNNER"></span><h3>TEST_RUNNER<a class="headerlink" href="#test-runner" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.test.runner.DiscoverRunner'</span></tt></p>
<p>The name of the class to use for starting the test suite. See
<a class="reference internal" href="../topics/testing/advanced.html#other-testing-frameworks"><em>Using different testing frameworks</em></a>.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.6:</span> <p>Previously the default <tt class="docutils literal"><span class="pre">TEST_RUNNER</span></tt> was
<tt class="docutils literal"><span class="pre">django.test.simple.DjangoTestSuiteRunner</span></tt>.</p>
</div>
</div>
<div class="section" id="s-test-non-serialized-apps">
<span id="s-std:setting-TEST_NON_SERIALIZED_APPS"></span><span id="test-non-serialized-apps"></span><span id="std:setting-TEST_NON_SERIALIZED_APPS"></span><h3>TEST_NON_SERIALIZED_APPS<a class="headerlink" href="#test-non-serialized-apps" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>Default: <tt class="docutils literal"><span class="pre">[]</span></tt></p>
<p>In order to restore the database state between tests for
<tt class="docutils literal"><span class="pre">TransactionTestCase</span></tt>s and database backends without transactions, Django
will <a class="reference internal" href="../topics/testing/overview.html#test-case-serialized-rollback"><em>serialize the contents of all apps with migrations</em></a> when it starts the test run so it can then
reload from that copy before tests that need it.</p>
<p>This slows down the startup time of the test runner; if you have apps that
you know don&#8217;t need this feature, you can add their full names in here (e.g.
<tt class="docutils literal"><span class="pre">'django.contrib.contenttypes'</span></tt>) to exclude them from this serialization
process.</p>
</div>
<div class="section" id="s-thousand-separator">
<span id="s-std:setting-THOUSAND_SEPARATOR"></span><span id="thousand-separator"></span><span id="std:setting-THOUSAND_SEPARATOR"></span><h3>THOUSAND_SEPARATOR<a class="headerlink" href="#thousand-separator" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">,</span></tt> (Comma)</p>
<p>Default thousand separator used when formatting numbers. This setting is
used only when <a class="reference internal" href="#std:setting-USE_THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">USE_THOUSAND_SEPARATOR</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt> and
<a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a> is greater than <tt class="docutils literal"><span class="pre">0</span></tt>.</p>
<p>Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the locale-dictated
format has higher precedence and will be applied instead.</p>
<p>See also <a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a>, <a class="reference internal" href="#std:setting-DECIMAL_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">DECIMAL_SEPARATOR</span></tt></a> and
<a class="reference internal" href="#std:setting-USE_THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">USE_THOUSAND_SEPARATOR</span></tt></a>.</p>
</div>
<div class="section" id="s-time-format">
<span id="s-std:setting-TIME_FORMAT"></span><span id="time-format"></span><span id="std:setting-TIME_FORMAT"></span><h3>TIME_FORMAT<a class="headerlink" href="#time-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'P'</span></tt> (e.g. <tt class="docutils literal"><span class="pre">4</span> <span class="pre">p.m.</span></tt>)</p>
<p>The default formatting to use for displaying time fields in any part of the
system. Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the
locale-dictated format has higher precedence and will be applied instead. See
<a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>.</p>
<p>See also <a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a> and <a class="reference internal" href="#std:setting-DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-time-input-formats">
<span id="s-std:setting-TIME_INPUT_FORMATS"></span><span id="time-input-formats"></span><span id="std:setting-TIME_INPUT_FORMATS"></span><h3>TIME_INPUT_FORMATS<a class="headerlink" href="#time-input-formats" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span>
    <span class="s">&#39;%H:%M:%S&#39;</span><span class="p">,</span>     <span class="c"># &#39;14:30:59&#39;</span>
    <span class="s">&#39;%H:%M:%S.</span><span class="si">%f</span><span class="s">&#39;</span><span class="p">,</span>  <span class="c"># &#39;14:30:59.000200&#39;</span>
    <span class="s">&#39;%H:%M&#39;</span><span class="p">,</span>        <span class="c"># &#39;14:30&#39;</span>
<span class="p">)</span>
</pre></div>
</div>
<p>A tuple of formats that will be accepted when inputting data on a time field.
Formats will be tried in order, using the first valid one. Note that these
format strings use Python&#8217;s <a class="reference external" href="http://docs.python.org/library/datetime.html#strftime-strptime-behavior">datetime</a> module syntax, not the format strings
from the <tt class="docutils literal"><span class="pre">date</span></tt> Django template tag.</p>
<p>When <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt>, the locale-dictated format has higher
precedence and will be applied instead.</p>
<p>See also <a class="reference internal" href="#std:setting-DATE_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_INPUT_FORMATS</span></tt></a> and <a class="reference internal" href="#std:setting-DATETIME_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_INPUT_FORMATS</span></tt></a>.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.6:</span> <p>Input format with microseconds has been added.</p>
</div>
</div>
<div class="section" id="s-time-zone">
<span id="s-std:setting-TIME_ZONE"></span><span id="time-zone"></span><span id="std:setting-TIME_ZONE"></span><h3>TIME_ZONE<a class="headerlink" href="#time-zone" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'America/Chicago'</span></tt></p>
<p>A string representing the time zone for this installation, or <tt class="docutils literal"><span class="pre">None</span></tt>. See
the <a class="reference external" href="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">list of time zones</a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Since Django was first released with the <a class="reference internal" href="#std:setting-TIME_ZONE"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_ZONE</span></tt></a> set to
<tt class="docutils literal"><span class="pre">'America/Chicago'</span></tt>, the global setting (used if nothing is defined in
your project&#8217;s <tt class="docutils literal"><span class="pre">settings.py</span></tt>) remains <tt class="docutils literal"><span class="pre">'America/Chicago'</span></tt> for backwards
compatibility. New project templates default to <tt class="docutils literal"><span class="pre">'UTC'</span></tt>.</p>
</div>
<p>Note that this isn&#8217;t necessarily the time zone of the server. For example, one
server may serve multiple Django-powered sites, each with a separate time zone
setting.</p>
<p>When <a class="reference internal" href="#std:setting-USE_TZ"><tt class="xref std std-setting docutils literal"><span class="pre">USE_TZ</span></tt></a> is <tt class="docutils literal"><span class="pre">False</span></tt>, this is the time zone in which Django
will store all datetimes. When <a class="reference internal" href="#std:setting-USE_TZ"><tt class="xref std std-setting docutils literal"><span class="pre">USE_TZ</span></tt></a> is <tt class="docutils literal"><span class="pre">True</span></tt>, this is the
default time zone that Django will use to display datetimes in templates and
to interpret datetimes entered in forms.</p>
<p>Django sets the <tt class="docutils literal"><span class="pre">os.environ['TZ']</span></tt> variable to the time zone you specify in
the <a class="reference internal" href="#std:setting-TIME_ZONE"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_ZONE</span></tt></a> setting. Thus, all your views and models will
automatically operate in this time zone. However, Django won&#8217;t set the <tt class="docutils literal"><span class="pre">TZ</span></tt>
environment variable under the following conditions:</p>
<ul class="simple">
<li>If you&#8217;re using the manual configuration option as described in
<a class="reference internal" href="../topics/settings.html#settings-without-django-settings-module"><em>manually configuring settings</em></a>, or</li>
<li>If you specify <tt class="docutils literal"><span class="pre">TIME_ZONE</span> <span class="pre">=</span> <span class="pre">None</span></tt>. This will cause Django to fall back to
using the system timezone. However, this is discouraged when <a class="reference internal" href="#std:setting-USE_TZ"><tt class="xref std std-setting docutils literal"><span class="pre">USE_TZ</span>
<span class="pre">=</span> <span class="pre">True</span></tt></a>, because it makes conversions between local time and UTC
less reliable.</li>
</ul>
<p>If Django doesn&#8217;t set the <tt class="docutils literal"><span class="pre">TZ</span></tt> environment variable, it&#8217;s up to you
to ensure your processes are running in the correct environment.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Django cannot reliably use alternate time zones in a Windows environment.
If you&#8217;re running Django on Windows, <a class="reference internal" href="#std:setting-TIME_ZONE"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_ZONE</span></tt></a> must be set to
match the system time zone.</p>
</div>
</div>
<div class="section" id="s-transactions-managed">
<span id="s-std:setting-TRANSACTIONS_MANAGED"></span><span id="transactions-managed"></span><span id="std:setting-TRANSACTIONS_MANAGED"></span><h3>TRANSACTIONS_MANAGED<a class="headerlink" href="#transactions-managed" title="Permalink to this headline">¶</a></h3>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.6: </span>This setting was deprecated because its name is very misleading. Use the
<a class="reference internal" href="#std:setting-DATABASE-AUTOCOMMIT"><tt class="xref std std-setting docutils literal"><span class="pre">AUTOCOMMIT</span></tt></a> key in <a class="reference internal" href="#std:setting-DATABASES"><tt class="xref std std-setting docutils literal"><span class="pre">DATABASES</span></tt></a>
entries instead.</p>
</div>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Set this to <tt class="docutils literal"><span class="pre">True</span></tt> if you want to <a class="reference internal" href="../topics/db/transactions.html#deactivate-transaction-management"><em>disable Django&#8217;s transaction
management</em></a> and implement your own.</p>
</div>
<div class="section" id="s-use-etags">
<span id="s-std:setting-USE_ETAGS"></span><span id="use-etags"></span><span id="std:setting-USE_ETAGS"></span><h3>USE_ETAGS<a class="headerlink" href="#use-etags" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that specifies whether to output the &#8220;Etag&#8221; header. This saves
bandwidth but slows down performance. This is used by the <tt class="docutils literal"><span class="pre">CommonMiddleware</span></tt>
(see <a class="reference internal" href="../topics/http/middleware.html"><em>Middleware</em></a>) and in the``Cache Framework``
(see <a class="reference internal" href="../topics/cache.html"><em>Django&#8217;s cache framework</em></a>).</p>
</div>
<div class="section" id="s-use-i18n">
<span id="s-std:setting-USE_I18N"></span><span id="use-i18n"></span><span id="std:setting-USE_I18N"></span><h3>USE_I18N<a class="headerlink" href="#use-i18n" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<p>A boolean that specifies whether Django&#8217;s translation system should be enabled.
This provides an easy way to turn it off, for performance. If this is set to
<tt class="docutils literal"><span class="pre">False</span></tt>, Django will make some optimizations so as not to load the
translation machinery.</p>
<p>See also <a class="reference internal" href="#std:setting-LANGUAGE_CODE"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_CODE</span></tt></a>, <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> and <a class="reference internal" href="#std:setting-USE_TZ"><tt class="xref std std-setting docutils literal"><span class="pre">USE_TZ</span></tt></a>.</p>
</div>
<div class="section" id="s-use-l10n">
<span id="s-std:setting-USE_L10N"></span><span id="use-l10n"></span><span id="std:setting-USE_L10N"></span><h3>USE_L10N<a class="headerlink" href="#use-l10n" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that specifies if localized formatting of data will be enabled by
default or not. If this is set to <tt class="docutils literal"><span class="pre">True</span></tt>, e.g. Django will display numbers and
dates using the format of the current locale.</p>
<p>See also <a class="reference internal" href="#std:setting-LANGUAGE_CODE"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_CODE</span></tt></a>, <a class="reference internal" href="#std:setting-USE_I18N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_I18N</span></tt></a> and <a class="reference internal" href="#std:setting-USE_TZ"><tt class="xref std std-setting docutils literal"><span class="pre">USE_TZ</span></tt></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The default <tt class="file docutils literal"><span class="pre">settings.py</span></tt> file created by <a class="reference internal" href="django-admin.html#django-admin-startproject"><tt class="xref std std-djadmin docutils literal"><span class="pre">django-admin.py</span>
<span class="pre">startproject</span></tt></a> includes <tt class="docutils literal"><span class="pre">USE_L10N</span> <span class="pre">=</span> <span class="pre">True</span></tt> for convenience.</p>
</div>
</div>
<div class="section" id="s-use-thousand-separator">
<span id="s-std:setting-USE_THOUSAND_SEPARATOR"></span><span id="use-thousand-separator"></span><span id="std:setting-USE_THOUSAND_SEPARATOR"></span><h3>USE_THOUSAND_SEPARATOR<a class="headerlink" href="#use-thousand-separator" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that specifies whether to display numbers using a thousand separator.
When <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt> and if this is also set to
<tt class="docutils literal"><span class="pre">True</span></tt>, Django will use the values of <a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a> and
<a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a> to format numbers.</p>
<p>See also <a class="reference internal" href="#std:setting-DECIMAL_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">DECIMAL_SEPARATOR</span></tt></a>, <a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a> and
<a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a>.</p>
</div>
<div class="section" id="s-use-tz">
<span id="s-std:setting-USE_TZ"></span><span id="use-tz"></span><span id="std:setting-USE_TZ"></span><h3>USE_TZ<a class="headerlink" href="#use-tz" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that specifies if datetimes will be timezone-aware by default or not.
If this is set to <tt class="docutils literal"><span class="pre">True</span></tt>, Django will use timezone-aware datetimes internally.
Otherwise, Django will use naive datetimes in local time.</p>
<p>See also <a class="reference internal" href="#std:setting-TIME_ZONE"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_ZONE</span></tt></a>, <a class="reference internal" href="#std:setting-USE_I18N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_I18N</span></tt></a> and <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The default <tt class="file docutils literal"><span class="pre">settings.py</span></tt> file created by
<a class="reference internal" href="django-admin.html#django-admin-startproject"><tt class="xref std std-djadmin docutils literal"><span class="pre">django-admin.py</span> <span class="pre">startproject</span></tt></a> includes
<tt class="docutils literal"><span class="pre">USE_TZ</span> <span class="pre">=</span> <span class="pre">True</span></tt> for convenience.</p>
</div>
</div>
<div class="section" id="s-use-x-forwarded-host">
<span id="s-std:setting-USE_X_FORWARDED_HOST"></span><span id="use-x-forwarded-host"></span><span id="std:setting-USE_X_FORWARDED_HOST"></span><h3>USE_X_FORWARDED_HOST<a class="headerlink" href="#use-x-forwarded-host" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>A boolean that specifies whether to use the X-Forwarded-Host header in
preference to the Host header. This should only be enabled if a proxy
which sets this header is in use.</p>
</div>
<div class="section" id="s-wsgi-application">
<span id="s-std:setting-WSGI_APPLICATION"></span><span id="wsgi-application"></span><span id="std:setting-WSGI_APPLICATION"></span><h3>WSGI_APPLICATION<a class="headerlink" href="#wsgi-application" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The full Python path of the WSGI application object that Django&#8217;s built-in
servers (e.g. <a class="reference internal" href="django-admin.html#django-admin-runserver"><tt class="xref std std-djadmin docutils literal"><span class="pre">runserver</span></tt></a>) will use. The <a class="reference internal" href="django-admin.html#django-admin-startproject"><tt class="xref std std-djadmin docutils literal"><span class="pre">django-admin.py</span>
<span class="pre">startproject</span></tt></a> management command will create a simple
<tt class="docutils literal"><span class="pre">wsgi.py</span></tt> file with an <tt class="docutils literal"><span class="pre">application</span></tt> callable in it, and point this setting
to that <tt class="docutils literal"><span class="pre">application</span></tt>.</p>
<p>If not set, the return value of <tt class="docutils literal"><span class="pre">django.core.wsgi.get_wsgi_application()</span></tt>
will be used. In this case, the behavior of <a class="reference internal" href="django-admin.html#django-admin-runserver"><tt class="xref std std-djadmin docutils literal"><span class="pre">runserver</span></tt></a> will be
identical to previous Django versions.</p>
</div>
<div class="section" id="s-year-month-format">
<span id="s-std:setting-YEAR_MONTH_FORMAT"></span><span id="year-month-format"></span><span id="std:setting-YEAR_MONTH_FORMAT"></span><h3>YEAR_MONTH_FORMAT<a class="headerlink" href="#year-month-format" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'F</span> <span class="pre">Y'</span></tt></p>
<p>The default formatting to use for date fields on Django admin change-list
pages &#8211; and, possibly, by other parts of the system &#8211; in cases when only the
year and month are displayed.</p>
<p>For example, when a Django admin change-list page is being filtered by a date
drilldown, the header for a given month displays the month and the year.
Different locales have different formats. For example, U.S. English would say
&#8220;January 2006,&#8221; whereas another locale might say &#8220;2006/January.&#8221;</p>
<p>Note that if <a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a> is set to <tt class="docutils literal"><span class="pre">True</span></tt>, then the corresponding
locale-dictated format has higher precedence and will be applied.</p>
<p>See <a class="reference internal" href="templates/builtins.html#std:templatefilter-date"><tt class="xref std std-tfilter docutils literal"><span class="pre">allowed</span> <span class="pre">date</span> <span class="pre">format</span> <span class="pre">strings</span></tt></a>. See also
<a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_FORMAT</span></tt></a>, <a class="reference internal" href="#std:setting-TIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_FORMAT</span></tt></a>
and <a class="reference internal" href="#std:setting-MONTH_DAY_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">MONTH_DAY_FORMAT</span></tt></a>.</p>
</div>
<div class="section" id="s-x-frame-options">
<span id="s-std:setting-X_FRAME_OPTIONS"></span><span id="x-frame-options"></span><span id="std:setting-X_FRAME_OPTIONS"></span><h3>X_FRAME_OPTIONS<a class="headerlink" href="#x-frame-options" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'SAMEORIGIN'</span></tt></p>
<p>The default value for the X-Frame-Options header used by
<a class="reference internal" href="middleware.html#django.middleware.clickjacking.XFrameOptionsMiddleware" title="django.middleware.clickjacking.XFrameOptionsMiddleware"><tt class="xref py py-class docutils literal"><span class="pre">XFrameOptionsMiddleware</span></tt></a>. See the
<a class="reference internal" href="clickjacking.html"><em>clickjacking protection</em></a> documentation.</p>
</div>
</div>
<div class="section" id="s-auth">
<span id="auth"></span><h2><a class="toc-backref" href="#id10">Auth</a><a class="headerlink" href="#auth" title="Permalink to this headline">¶</a></h2>
<p>Settings for <a class="reference internal" href="../topics/auth/index.html#module-django.contrib.auth" title="django.contrib.auth: Django's authentication framework."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.auth</span></tt></a>.</p>
<div class="section" id="s-authentication-backends">
<span id="s-std:setting-AUTHENTICATION_BACKENDS"></span><span id="authentication-backends"></span><span id="std:setting-AUTHENTICATION_BACKENDS"></span><h3>AUTHENTICATION_BACKENDS<a class="headerlink" href="#authentication-backends" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">('django.contrib.auth.backends.ModelBackend',)</span></tt></p>
<p>A tuple of authentication backend classes (as strings) to use when attempting to
authenticate a user. See the <a class="reference internal" href="../topics/auth/customizing.html#authentication-backends"><em>authentication backends documentation</em></a> for details.</p>
</div>
<div class="section" id="s-auth-user-model">
<span id="s-std:setting-AUTH_USER_MODEL"></span><span id="auth-user-model"></span><span id="std:setting-AUTH_USER_MODEL"></span><h3>AUTH_USER_MODEL<a class="headerlink" href="#auth-user-model" title="Permalink to this headline">¶</a></h3>
<p>Default: &#8216;auth.User&#8217;</p>
<p>The model to use to represent a User. See <a class="reference internal" href="../topics/auth/customizing.html#auth-custom-user"><em>Substituting a custom User model</em></a>.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You cannot change the AUTH_USER_MODEL setting during the lifetime of
a project (i.e. once you have made and migrated models that depend on it)
without serious effort. It is intended to be set at the project start,
and the model it refers to must be available in the first migration of
the app that it lives in.
See <a class="reference internal" href="../topics/auth/customizing.html#auth-custom-user"><em>Substituting a custom User model</em></a> for more details.</p>
</div>
</div>
<div class="section" id="s-login-redirect-url">
<span id="s-std:setting-LOGIN_REDIRECT_URL"></span><span id="login-redirect-url"></span><span id="std:setting-LOGIN_REDIRECT_URL"></span><h3>LOGIN_REDIRECT_URL<a class="headerlink" href="#login-redirect-url" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'/accounts/profile/'</span></tt></p>
<p>The URL where requests are redirected after login when the
<tt class="docutils literal"><span class="pre">contrib.auth.login</span></tt> view gets no <tt class="docutils literal"><span class="pre">next</span></tt> parameter.</p>
<p>This is used by the <a class="reference internal" href="../topics/auth/default.html#django.contrib.auth.decorators.login_required" title="django.contrib.auth.decorators.login_required"><tt class="xref py py-func docutils literal"><span class="pre">login_required()</span></tt></a>
decorator, for example.</p>
<p>This setting also accepts view function names and <a class="reference internal" href="../topics/http/urls.html#naming-url-patterns"><em>named URL patterns</em></a> which can be used to reduce configuration duplication
since you don&#8217;t have to define the URL in two places (<tt class="docutils literal"><span class="pre">settings</span></tt> and URLconf).</p>
</div>
<div class="section" id="s-login-url">
<span id="s-std:setting-LOGIN_URL"></span><span id="login-url"></span><span id="std:setting-LOGIN_URL"></span><h3>LOGIN_URL<a class="headerlink" href="#login-url" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'/accounts/login/'</span></tt></p>
<p>The URL where requests are redirected for login, especially when using the
<a class="reference internal" href="../topics/auth/default.html#django.contrib.auth.decorators.login_required" title="django.contrib.auth.decorators.login_required"><tt class="xref py py-func docutils literal"><span class="pre">login_required()</span></tt></a> decorator.</p>
<p>This setting also accepts view function names and <a class="reference internal" href="../topics/http/urls.html#naming-url-patterns"><em>named URL patterns</em></a> which can be used to reduce configuration duplication
since you don&#8217;t have to define the URL in two places (<tt class="docutils literal"><span class="pre">settings</span></tt> and URLconf).</p>
</div>
<div class="section" id="s-logout-url">
<span id="s-std:setting-LOGOUT_URL"></span><span id="logout-url"></span><span id="std:setting-LOGOUT_URL"></span><h3>LOGOUT_URL<a class="headerlink" href="#logout-url" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'/accounts/logout/'</span></tt></p>
<p>LOGIN_URL counterpart.</p>
</div>
<div class="section" id="s-password-reset-timeout-days">
<span id="s-std:setting-PASSWORD_RESET_TIMEOUT_DAYS"></span><span id="password-reset-timeout-days"></span><span id="std:setting-PASSWORD_RESET_TIMEOUT_DAYS"></span><h3>PASSWORD_RESET_TIMEOUT_DAYS<a class="headerlink" href="#password-reset-timeout-days" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">3</span></tt></p>
<p>The number of days a password reset link is valid for. Used by the
<a class="reference internal" href="../topics/auth/index.html#module-django.contrib.auth" title="django.contrib.auth: Django's authentication framework."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.auth</span></tt></a> password reset mechanism.</p>
</div>
<div class="section" id="s-password-hashers">
<span id="s-std:setting-PASSWORD_HASHERS"></span><span id="password-hashers"></span><span id="std:setting-PASSWORD_HASHERS"></span><h3>PASSWORD_HASHERS<a class="headerlink" href="#password-hashers" title="Permalink to this headline">¶</a></h3>
<p>See <a class="reference internal" href="../topics/auth/passwords.html#auth-password-storage"><em>How Django stores passwords</em></a>.</p>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&#39;django.contrib.auth.hashers.PBKDF2PasswordHasher&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.contrib.auth.hashers.BCryptPasswordHasher&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.contrib.auth.hashers.SHA1PasswordHasher&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.contrib.auth.hashers.MD5PasswordHasher&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.contrib.auth.hashers.UnsaltedMD5PasswordHasher&#39;</span><span class="p">,</span>
 <span class="s">&#39;django.contrib.auth.hashers.CryptPasswordHasher&#39;</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="s-comments">
<span id="s-settings-comments"></span><span id="comments"></span><span id="settings-comments"></span><h2><a class="toc-backref" href="#id11">Comments</a><a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h2>
<p>Settings for <a class="reference internal" href="contrib/comments/index.html#module-django.contrib.comments" title="django.contrib.comments: Django's comment framework"><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.comments</span></tt></a>.</p>
<div class="section" id="s-comments-hide-removed">
<span id="s-std:setting-COMMENTS_HIDE_REMOVED"></span><span id="comments-hide-removed"></span><span id="std:setting-COMMENTS_HIDE_REMOVED"></span><h3>COMMENTS_HIDE_REMOVED<a class="headerlink" href="#comments-hide-removed" title="Permalink to this headline">¶</a></h3>
<p>If <tt class="docutils literal"><span class="pre">True</span></tt> (default), removed comments will be excluded from comment
lists/counts (as taken from template tags). Otherwise, the template author is
responsible for some sort of a &#8220;this comment has been removed by the site staff&#8221;
message.</p>
</div>
<div class="section" id="s-comment-max-length">
<span id="s-std:setting-COMMENT_MAX_LENGTH"></span><span id="comment-max-length"></span><span id="std:setting-COMMENT_MAX_LENGTH"></span><h3>COMMENT_MAX_LENGTH<a class="headerlink" href="#comment-max-length" title="Permalink to this headline">¶</a></h3>
<p>The maximum length of the comment field, in characters. Comments longer than
this will be rejected. Defaults to 3000.</p>
</div>
<div class="section" id="s-comments-app">
<span id="s-std:setting-COMMENTS_APP"></span><span id="comments-app"></span><span id="std:setting-COMMENTS_APP"></span><h3>COMMENTS_APP<a class="headerlink" href="#comments-app" title="Permalink to this headline">¶</a></h3>
<p>An app which provides <a class="reference internal" href="contrib/comments/custom.html"><em>customization of the comments framework</em></a>.  Use the same dotted-string notation
as in <a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a>.  Your custom <a class="reference internal" href="#std:setting-COMMENTS_APP"><tt class="xref std std-setting docutils literal"><span class="pre">COMMENTS_APP</span></tt></a>
must also be listed in <a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a>.</p>
</div>
<div class="section" id="s-profanities-list">
<span id="s-std:setting-PROFANITIES_LIST"></span><span id="profanities-list"></span><span id="std:setting-PROFANITIES_LIST"></span><h3>PROFANITIES_LIST<a class="headerlink" href="#profanities-list" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">()</span></tt> (Empty tuple)</p>
<p>A tuple of profanities, as strings, that will be forbidden in comments when
<tt class="docutils literal"><span class="pre">COMMENTS_ALLOW_PROFANITIES</span></tt> is <tt class="docutils literal"><span class="pre">False</span></tt>.</p>
</div>
</div>
<div class="section" id="s-messages">
<span id="s-settings-messages"></span><span id="messages"></span><span id="settings-messages"></span><h2><a class="toc-backref" href="#id12">Messages</a><a class="headerlink" href="#messages" title="Permalink to this headline">¶</a></h2>
<p>Settings for <a class="reference internal" href="contrib/messages.html#module-django.contrib.messages" title="django.contrib.messages: Provides cookie- and session-based temporary message storage."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.messages</span></tt></a>.</p>
<div class="section" id="s-message-level">
<span id="s-std:setting-MESSAGE_LEVEL"></span><span id="message-level"></span><span id="std:setting-MESSAGE_LEVEL"></span><h3>MESSAGE_LEVEL<a class="headerlink" href="#message-level" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">messages.INFO</span></tt></p>
<p>Sets the minimum message level that will be recorded by the messages
framework. See <a class="reference internal" href="contrib/messages.html#message-level"><em>message levels</em></a> for more details.</p>
<div class="admonition-important admonition">
<p class="first admonition-title">Important</p>
<p>If you override <tt class="docutils literal"><span class="pre">MESSAGE_LEVEL</span></tt> in your settings file and rely on any of
the built-in constants, you must import the constants module directly to
avoid the potential for circular imports, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib.messages</span> <span class="kn">import</span> <span class="n">constants</span> <span class="k">as</span> <span class="n">message_constants</span>
<span class="n">MESSAGE_LEVEL</span> <span class="o">=</span> <span class="n">message_constants</span><span class="o">.</span><span class="n">DEBUG</span>
</pre></div>
</div>
<p class="last">If desired, you may specify the numeric values for the constants directly
according to the values in the above <a class="reference internal" href="contrib/messages.html#message-level-constants"><em>constants table</em></a>.</p>
</div>
</div>
<div class="section" id="s-message-storage">
<span id="s-std:setting-MESSAGE_STORAGE"></span><span id="message-storage"></span><span id="std:setting-MESSAGE_STORAGE"></span><h3>MESSAGE_STORAGE<a class="headerlink" href="#message-storage" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.contrib.messages.storage.fallback.FallbackStorage'</span></tt></p>
<p>Controls where Django stores message data. Valid values are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'django.contrib.messages.storage.fallback.FallbackStorage'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.messages.storage.session.SessionStorage'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.messages.storage.cookie.CookieStorage'</span></tt></li>
</ul>
<p>See <a class="reference internal" href="contrib/messages.html#message-storage-backends"><em>message storage backends</em></a> for more details.</p>
<p>The backends that use cookies &#8211;
<a class="reference internal" href="contrib/messages.html#django.contrib.messages.storage.cookie.CookieStorage" title="django.contrib.messages.storage.cookie.CookieStorage"><tt class="xref py py-class docutils literal"><span class="pre">CookieStorage</span></tt></a> and
<a class="reference internal" href="contrib/messages.html#django.contrib.messages.storage.fallback.FallbackStorage" title="django.contrib.messages.storage.fallback.FallbackStorage"><tt class="xref py py-class docutils literal"><span class="pre">FallbackStorage</span></tt></a> &#8211;
use the value of <a class="reference internal" href="#std:setting-SESSION_COOKIE_DOMAIN"><tt class="xref std std-setting docutils literal"><span class="pre">SESSION_COOKIE_DOMAIN</span></tt></a>, <a class="reference internal" href="#std:setting-SESSION_COOKIE_SECURE"><tt class="xref std std-setting docutils literal"><span class="pre">SESSION_COOKIE_SECURE</span></tt></a>
and <a class="reference internal" href="#std:setting-SESSION_COOKIE_HTTPONLY"><tt class="xref std std-setting docutils literal"><span class="pre">SESSION_COOKIE_HTTPONLY</span></tt></a> when setting their cookies.</p>
</div>
<div class="section" id="s-message-tags">
<span id="s-std:setting-MESSAGE_TAGS"></span><span id="message-tags"></span><span id="std:setting-MESSAGE_TAGS"></span><h3>MESSAGE_TAGS<a class="headerlink" href="#message-tags" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span><span class="n">messages</span><span class="o">.</span><span class="n">DEBUG</span><span class="p">:</span> <span class="s">&#39;debug&#39;</span><span class="p">,</span>
<span class="n">messages</span><span class="o">.</span><span class="n">INFO</span><span class="p">:</span> <span class="s">&#39;info&#39;</span><span class="p">,</span>
<span class="n">messages</span><span class="o">.</span><span class="n">SUCCESS</span><span class="p">:</span> <span class="s">&#39;success&#39;</span><span class="p">,</span>
<span class="n">messages</span><span class="o">.</span><span class="n">WARNING</span><span class="p">:</span> <span class="s">&#39;warning&#39;</span><span class="p">,</span>
<span class="n">messages</span><span class="o">.</span><span class="n">ERROR</span><span class="p">:</span> <span class="s">&#39;error&#39;</span><span class="p">}</span>
</pre></div>
</div>
<p>This sets the mapping of message level to message tag, which is typically
rendered as a CSS class in HTML. If you specify a value, it will extend
the default. This means you only have to specify those values which you need
to override. See <a class="reference internal" href="contrib/messages.html#message-displaying"><em>Displaying messages</em></a> above for more details.</p>
<div class="admonition-important admonition">
<p class="first admonition-title">Important</p>
<p>If you override <tt class="docutils literal"><span class="pre">MESSAGE_TAGS</span></tt> in your settings file and rely on any of
the built-in constants, you must import the <tt class="docutils literal"><span class="pre">constants</span></tt> module directly to
avoid the potential for circular imports, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib.messages</span> <span class="kn">import</span> <span class="n">constants</span> <span class="k">as</span> <span class="n">message_constants</span>
<span class="n">MESSAGE_TAGS</span> <span class="o">=</span> <span class="p">{</span><span class="n">message_constants</span><span class="o">.</span><span class="n">INFO</span><span class="p">:</span> <span class="s">&#39;&#39;</span><span class="p">}</span>
</pre></div>
</div>
<p class="last">If desired, you may specify the numeric values for the constants directly
according to the values in the above <a class="reference internal" href="contrib/messages.html#message-level-constants"><em>constants table</em></a>.</p>
</div>
</div>
</div>
<div class="section" id="s-sessions">
<span id="s-settings-sessions"></span><span id="sessions"></span><span id="settings-sessions"></span><h2><a class="toc-backref" href="#id13">Sessions</a><a class="headerlink" href="#sessions" title="Permalink to this headline">¶</a></h2>
<p>Settings for <a class="reference internal" href="../topics/http/sessions.html#module-django.contrib.sessions" title="django.contrib.sessions: Provides session management for Django projects."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.sessions</span></tt></a>.</p>
<div class="section" id="s-session-cache-alias">
<span id="s-std:setting-SESSION_CACHE_ALIAS"></span><span id="session-cache-alias"></span><span id="std:setting-SESSION_CACHE_ALIAS"></span><h3>SESSION_CACHE_ALIAS<a class="headerlink" href="#session-cache-alias" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">default</span></tt></p>
<p>If you&#8217;re using <a class="reference internal" href="../topics/http/sessions.html#cached-sessions-backend"><em>cache-based session storage</em></a>,
this selects the cache to use.</p>
</div>
<div class="section" id="s-session-cookie-age">
<span id="s-std:setting-SESSION_COOKIE_AGE"></span><span id="session-cookie-age"></span><span id="std:setting-SESSION_COOKIE_AGE"></span><h3>SESSION_COOKIE_AGE<a class="headerlink" href="#session-cookie-age" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">1209600</span></tt> (2 weeks, in seconds)</p>
<p>The age of session cookies, in seconds.</p>
</div>
<div class="section" id="s-session-cookie-domain">
<span id="s-std:setting-SESSION_COOKIE_DOMAIN"></span><span id="session-cookie-domain"></span><span id="std:setting-SESSION_COOKIE_DOMAIN"></span><h3>SESSION_COOKIE_DOMAIN<a class="headerlink" href="#session-cookie-domain" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>The domain to use for session cookies. Set this to a string such as
<tt class="docutils literal"><span class="pre">&quot;.example.com&quot;</span></tt> (note the leading dot!) for cross-domain cookies, or use
<tt class="docutils literal"><span class="pre">None</span></tt> for a standard domain cookie.</p>
<p>Be cautious when updating this setting on a production site. If you update
this setting to enable cross-domain cookies on a site that previously used
standard domain cookies, existing user cookies will be set to the old
domain. This may result in them being unable to log in as long as these cookies
persist.</p>
<p>This setting also affects cookies set by <a class="reference internal" href="contrib/messages.html#module-django.contrib.messages" title="django.contrib.messages: Provides cookie- and session-based temporary message storage."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.messages</span></tt></a>.</p>
</div>
<div class="section" id="s-session-cookie-httponly">
<span id="s-std:setting-SESSION_COOKIE_HTTPONLY"></span><span id="session-cookie-httponly"></span><span id="std:setting-SESSION_COOKIE_HTTPONLY"></span><h3>SESSION_COOKIE_HTTPONLY<a class="headerlink" href="#session-cookie-httponly" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<p>Whether to use <tt class="docutils literal"><span class="pre">HTTPOnly</span></tt> flag on the session cookie. If this is set to
<tt class="docutils literal"><span class="pre">True</span></tt>, client-side JavaScript will not to be able to access the
session cookie.</p>
<p><a class="reference external" href="https://www.owasp.org/index.php/HTTPOnly">HTTPOnly</a> is a flag included in a Set-Cookie HTTP response header. It
is not part of the <span class="target" id="index-0"></span><a class="rfc reference external" href="http://tools.ietf.org/html/rfc2109.html"><strong>RFC 2109</strong></a> standard for cookies, and it isn&#8217;t honored
consistently by all browsers. However, when it is honored, it can be a
useful way to mitigate the risk of client side script accessing the
protected cookie data.</p>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>This setting also affects cookies set by <a class="reference internal" href="contrib/messages.html#module-django.contrib.messages" title="django.contrib.messages: Provides cookie- and session-based temporary message storage."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.messages</span></tt></a>.</p>
</div>
<div class="section" id="s-session-cookie-name">
<span id="s-std:setting-SESSION_COOKIE_NAME"></span><span id="session-cookie-name"></span><span id="std:setting-SESSION_COOKIE_NAME"></span><h3>SESSION_COOKIE_NAME<a class="headerlink" href="#session-cookie-name" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'sessionid'</span></tt></p>
<p>The name of the cookie to use for sessions. This can be whatever you want (but
should be different from <a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_NAME</span></tt></a>).</p>
</div>
<div class="section" id="s-session-cookie-path">
<span id="s-std:setting-SESSION_COOKIE_PATH"></span><span id="session-cookie-path"></span><span id="std:setting-SESSION_COOKIE_PATH"></span><h3>SESSION_COOKIE_PATH<a class="headerlink" href="#session-cookie-path" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'/'</span></tt></p>
<p>The path set on the session cookie. This should either match the URL path of your
Django installation or be parent of that path.</p>
<p>This is useful if you have multiple Django instances running under the same
hostname. They can use different cookie paths, and each instance will only see
its own session cookie.</p>
</div>
<div class="section" id="s-session-cookie-secure">
<span id="s-std:setting-SESSION_COOKIE_SECURE"></span><span id="session-cookie-secure"></span><span id="std:setting-SESSION_COOKIE_SECURE"></span><h3>SESSION_COOKIE_SECURE<a class="headerlink" href="#session-cookie-secure" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to use a secure cookie for the session cookie. If this is set to
<tt class="docutils literal"><span class="pre">True</span></tt>, the cookie will be marked as &#8220;secure,&#8221; which means browsers may
ensure that the cookie is only sent under an HTTPS connection.</p>
<div class="versionadded">
<span class="title">New in Django 1.7.</span> </div>
<p>This setting also affects cookies set by <a class="reference internal" href="contrib/messages.html#module-django.contrib.messages" title="django.contrib.messages: Provides cookie- and session-based temporary message storage."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.messages</span></tt></a>.</p>
</div>
<div class="section" id="s-session-engine">
<span id="s-std:setting-SESSION_ENGINE"></span><span id="session-engine"></span><span id="std:setting-SESSION_ENGINE"></span><h3>SESSION_ENGINE<a class="headerlink" href="#session-engine" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">django.contrib.sessions.backends.db</span></tt></p>
<p>Controls where Django stores session data. Included engines are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.backends.db'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.backends.file'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.backends.cache'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.backends.cached_db'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.backends.signed_cookies'</span></tt></li>
</ul>
<p>See <a class="reference internal" href="../topics/http/sessions.html#configuring-sessions"><em>Configuring the session engine</em></a> for more details.</p>
</div>
<div class="section" id="s-session-expire-at-browser-close">
<span id="s-std:setting-SESSION_EXPIRE_AT_BROWSER_CLOSE"></span><span id="session-expire-at-browser-close"></span><span id="std:setting-SESSION_EXPIRE_AT_BROWSER_CLOSE"></span><h3>SESSION_EXPIRE_AT_BROWSER_CLOSE<a class="headerlink" href="#session-expire-at-browser-close" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to expire the session when the user closes their browser. See
<a class="reference internal" href="../topics/http/sessions.html#browser-length-vs-persistent-sessions"><em>Browser-length sessions vs. persistent sessions</em></a>.</p>
</div>
<div class="section" id="s-session-file-path">
<span id="s-std:setting-SESSION_FILE_PATH"></span><span id="session-file-path"></span><span id="std:setting-SESSION_FILE_PATH"></span><h3>SESSION_FILE_PATH<a class="headerlink" href="#session-file-path" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>If you&#8217;re using file-based session storage, this sets the directory in
which Django will store session data. When the default value (<tt class="docutils literal"><span class="pre">None</span></tt>) is
used, Django will use the standard temporary directory for the system.</p>
</div>
<div class="section" id="s-session-save-every-request">
<span id="s-std:setting-SESSION_SAVE_EVERY_REQUEST"></span><span id="session-save-every-request"></span><span id="std:setting-SESSION_SAVE_EVERY_REQUEST"></span><h3>SESSION_SAVE_EVERY_REQUEST<a class="headerlink" href="#session-save-every-request" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<p>Whether to save the session data on every request. If this is <tt class="docutils literal"><span class="pre">False</span></tt>
(default), then the session data will only be saved if it has been modified &#8211;
that is, if any of its dictionary values have been assigned or deleted.</p>
</div>
<div class="section" id="s-session-serializer">
<span id="s-std:setting-SESSION_SERIALIZER"></span><span id="session-serializer"></span><span id="std:setting-SESSION_SERIALIZER"></span><h3>SESSION_SERIALIZER<a class="headerlink" href="#session-serializer" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.contrib.sessions.serializers.JSONSerializer'</span></tt></p>
<div class="versionchanged">
<span class="title">Changed in Django 1.6:</span> <p>The default switched from
<a class="reference internal" href="../topics/http/sessions.html#django.contrib.sessions.serializers.PickleSerializer" title="django.contrib.sessions.serializers.PickleSerializer"><tt class="xref py py-class docutils literal"><span class="pre">PickleSerializer</span></tt></a> to
<a class="reference internal" href="../topics/http/sessions.html#django.contrib.sessions.serializers.JSONSerializer" title="django.contrib.sessions.serializers.JSONSerializer"><tt class="xref py py-class docutils literal"><span class="pre">JSONSerializer</span></tt></a> in Django 1.6.</p>
</div>
<p>Full import path of a serializer class to use for serializing session data.
Included serializers are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.serializers.PickleSerializer'</span></tt></li>
<li><tt class="docutils literal"><span class="pre">'django.contrib.sessions.serializers.JSONSerializer'</span></tt></li>
</ul>
<p>See <a class="reference internal" href="../topics/http/sessions.html#session-serialization"><em>Session serialization</em></a> for details, including a warning regarding
possible remote code execution when using
<a class="reference internal" href="../topics/http/sessions.html#django.contrib.sessions.serializers.PickleSerializer" title="django.contrib.sessions.serializers.PickleSerializer"><tt class="xref py py-class docutils literal"><span class="pre">PickleSerializer</span></tt></a>.</p>
</div>
</div>
<div class="section" id="s-sites">
<span id="sites"></span><h2><a class="toc-backref" href="#id14">Sites</a><a class="headerlink" href="#sites" title="Permalink to this headline">¶</a></h2>
<p>Settings for <a class="reference internal" href="contrib/sites.html#module-django.contrib.sites" title="django.contrib.sites: Lets you operate multiple Web sites from the same database and Django project"><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.sites</span></tt></a>.</p>
<div class="section" id="s-site-id">
<span id="s-std:setting-SITE_ID"></span><span id="site-id"></span><span id="std:setting-SITE_ID"></span><h3>SITE_ID<a class="headerlink" href="#site-id" title="Permalink to this headline">¶</a></h3>
<p>Default: Not defined</p>
<p>The ID, as an integer, of the current site in the <tt class="docutils literal"><span class="pre">django_site</span></tt> database
table. This is used so that application data can hook into specific sites
and a single database can manage content for multiple sites.</p>
</div>
</div>
<div class="section" id="s-static-files">
<span id="s-settings-staticfiles"></span><span id="static-files"></span><span id="settings-staticfiles"></span><h2><a class="toc-backref" href="#id15">Static files</a><a class="headerlink" href="#static-files" title="Permalink to this headline">¶</a></h2>
<p>Settings for <a class="reference internal" href="contrib/staticfiles.html#module-django.contrib.staticfiles" title="django.contrib.staticfiles: An app for handling static files."><tt class="xref py py-mod docutils literal"><span class="pre">django.contrib.staticfiles</span></tt></a>.</p>
<div class="section" id="s-static-root">
<span id="s-std:setting-STATIC_ROOT"></span><span id="static-root"></span><span id="std:setting-STATIC_ROOT"></span><h3>STATIC_ROOT<a class="headerlink" href="#static-root" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<div class="versionchanged">
<span class="title">Changed in Django 1.6.2:</span> <p>The default changed from <tt class="docutils literal"><span class="pre">''</span></tt> (empty string) to <tt class="docutils literal"><span class="pre">None</span></tt>.</p>
</div>
<p>The absolute path to the directory where <a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> will collect
static files for deployment.</p>
<p>Example: <tt class="docutils literal"><span class="pre">&quot;/var/www/example.com/static/&quot;</span></tt></p>
<p>If the <a class="reference internal" href="contrib/staticfiles.html"><em>staticfiles</em></a> contrib app is enabled
(default) the <a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> management command will collect static
files into this directory. See the howto on <a class="reference internal" href="../howto/static-files/index.html"><em>managing static
files</em></a> for more details about usage.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This should be an (initially empty) destination directory for collecting
your static files from their permanent locations into one directory for
ease of deployment; it is <strong>not</strong> a place to store your static files
permanently. You should do that in directories that will be found by
<a class="reference internal" href="contrib/staticfiles.html"><em>staticfiles</em></a>’s
<a class="reference internal" href="#std:setting-STATICFILES_FINDERS"><tt class="xref std std-setting docutils literal"><span class="pre">finders</span></tt></a>, which by default, are
<tt class="docutils literal"><span class="pre">'static/'</span></tt> app sub-directories and any directories you include in
<a class="reference internal" href="#std:setting-STATICFILES_DIRS"><tt class="xref std std-setting docutils literal"><span class="pre">STATICFILES_DIRS</span></tt></a>).</p>
</div>
</div>
<div class="section" id="s-static-url">
<span id="s-std:setting-STATIC_URL"></span><span id="static-url"></span><span id="std:setting-STATIC_URL"></span><h3>STATIC_URL<a class="headerlink" href="#static-url" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">None</span></tt></p>
<p>URL to use when referring to static files located in <a class="reference internal" href="#std:setting-STATIC_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">STATIC_ROOT</span></tt></a>.</p>
<p>Example: <tt class="docutils literal"><span class="pre">&quot;/static/&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;http://static.example.com/&quot;</span></tt></p>
<p>If not <tt class="docutils literal"><span class="pre">None</span></tt>, this will be used as the base path for
<a class="reference internal" href="../topics/forms/media.html#form-asset-paths"><em>asset definitions</em></a> (the <tt class="docutils literal"><span class="pre">Media</span></tt> class) and the
<a class="reference internal" href="contrib/staticfiles.html"><em>staticfiles app</em></a>.</p>
<p>It must end in a slash if set to a non-empty value.</p>
<p>You may need to <a class="reference internal" href="../howto/static-files/index.html#serving-static-files-in-development"><em>configure these files to be served in development</em></a> and will definitely need to do so
<a class="reference internal" href="../howto/static-files/deployment.html"><em>in production</em></a>.</p>
</div>
<div class="section" id="s-staticfiles-dirs">
<span id="s-std:setting-STATICFILES_DIRS"></span><span id="staticfiles-dirs"></span><span id="std:setting-STATICFILES_DIRS"></span><h3>STATICFILES_DIRS<a class="headerlink" href="#staticfiles-dirs" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">[]</span></tt></p>
<p>This setting defines the additional locations the staticfiles app will traverse
if the <tt class="docutils literal"><span class="pre">FileSystemFinder</span></tt> finder is enabled, e.g. if you use the
<a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> or <a class="reference internal" href="contrib/staticfiles.html#django-admin-findstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">findstatic</span></tt></a> management command or use the
static file serving view.</p>
<p>This should be set to a list or tuple of strings that contain full paths to
your additional files directory(ies) e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">STATICFILES_DIRS</span> <span class="o">=</span> <span class="p">(</span>
    <span class="s">&quot;/home/special.polls.com/polls/static&quot;</span><span class="p">,</span>
    <span class="s">&quot;/home/polls.com/polls/static&quot;</span><span class="p">,</span>
    <span class="s">&quot;/opt/webfiles/common&quot;</span><span class="p">,</span>
<span class="p">)</span>
</pre></div>
</div>
<p>Note that these paths should use Unix-style forward slashes, even on Windows
(e.g. <tt class="docutils literal"><span class="pre">&quot;C:/Users/user/mysite/extra_static_content&quot;</span></tt>).</p>
<div class="section" id="s-prefixes-optional">
<span id="prefixes-optional"></span><h4>Prefixes (optional)<a class="headerlink" href="#prefixes-optional" title="Permalink to this headline">¶</a></h4>
<p>In case you want to refer to files in one of the locations with an additional
namespace, you can <strong>optionally</strong> provide a prefix as <tt class="docutils literal"><span class="pre">(prefix,</span> <span class="pre">path)</span></tt>
tuples, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">STATICFILES_DIRS</span> <span class="o">=</span> <span class="p">(</span>
    <span class="c"># ...</span>
    <span class="p">(</span><span class="s">&quot;downloads&quot;</span><span class="p">,</span> <span class="s">&quot;/opt/webfiles/stats&quot;</span><span class="p">),</span>
<span class="p">)</span>
</pre></div>
</div>
<p>For example, assuming you have <a class="reference internal" href="#std:setting-STATIC_URL"><tt class="xref std std-setting docutils literal"><span class="pre">STATIC_URL</span></tt></a> set to <tt class="docutils literal"><span class="pre">'/static/'</span></tt>, the
<a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> management command would collect the &#8220;stats&#8221; files
in a <tt class="docutils literal"><span class="pre">'downloads'</span></tt> subdirectory of <a class="reference internal" href="#std:setting-STATIC_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">STATIC_ROOT</span></tt></a>.</p>
<p>This would allow you to refer to the local file
<tt class="docutils literal"><span class="pre">'/opt/webfiles/stats/polls_20101022.tar.gz'</span></tt> with
<tt class="docutils literal"><span class="pre">'/static/downloads/polls_20101022.tar.gz'</span></tt> in your templates, e.g.:</p>
<div class="highlight-html+django"><div class="highlight"><pre><span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">&quot;</span><span class="cp">{%</span> <span class="k">static</span> <span class="s2">&quot;downloads/polls_20101022.tar.gz&quot;</span> <span class="cp">%}</span><span class="s">&quot;</span><span class="nt">&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="s-staticfiles-storage">
<span id="s-std:setting-STATICFILES_STORAGE"></span><span id="staticfiles-storage"></span><span id="std:setting-STATICFILES_STORAGE"></span><h3>STATICFILES_STORAGE<a class="headerlink" href="#staticfiles-storage" title="Permalink to this headline">¶</a></h3>
<p>Default: <tt class="docutils literal"><span class="pre">'django.contrib.staticfiles.storage.StaticFilesStorage'</span></tt></p>
<p>The file storage engine to use when collecting static files with the
<a class="reference internal" href="contrib/staticfiles.html#django-admin-collectstatic"><tt class="xref std std-djadmin docutils literal"><span class="pre">collectstatic</span></tt></a> management command.</p>
<p>A ready-to-use instance of the storage backend defined in this setting
can be found at <tt class="docutils literal"><span class="pre">django.contrib.staticfiles.storage.staticfiles_storage</span></tt>.</p>
<p>For an example, see <a class="reference internal" href="../howto/static-files/deployment.html#staticfiles-from-cdn"><em>Serving static files from a cloud service or CDN</em></a>.</p>
</div>
<div class="section" id="s-staticfiles-finders">
<span id="s-std:setting-STATICFILES_FINDERS"></span><span id="staticfiles-finders"></span><span id="std:setting-STATICFILES_FINDERS"></span><h3>STATICFILES_FINDERS<a class="headerlink" href="#staticfiles-finders" title="Permalink to this headline">¶</a></h3>
<p>Default:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&quot;django.contrib.staticfiles.finders.FileSystemFinder&quot;</span><span class="p">,</span>
 <span class="s">&quot;django.contrib.staticfiles.finders.AppDirectoriesFinder&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>The list of finder backends that know how to find static files in
various locations.</p>
<p>The default will find files stored in the <a class="reference internal" href="#std:setting-STATICFILES_DIRS"><tt class="xref std std-setting docutils literal"><span class="pre">STATICFILES_DIRS</span></tt></a> setting
(using <tt class="docutils literal"><span class="pre">django.contrib.staticfiles.finders.FileSystemFinder</span></tt>) and in a
<tt class="docutils literal"><span class="pre">static</span></tt> subdirectory of each app (using
<tt class="docutils literal"><span class="pre">django.contrib.staticfiles.finders.AppDirectoriesFinder</span></tt>). If multiple
files with the same name are present, the first file that is found will be
used.</p>
<p>One finder is disabled by default:
<tt class="docutils literal"><span class="pre">django.contrib.staticfiles.finders.DefaultStorageFinder</span></tt>. If added to
your <a class="reference internal" href="#std:setting-STATICFILES_FINDERS"><tt class="xref std std-setting docutils literal"><span class="pre">STATICFILES_FINDERS</span></tt></a> setting, it will look for static files in
the default file storage as defined by the <a class="reference internal" href="#std:setting-DEFAULT_FILE_STORAGE"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_FILE_STORAGE</span></tt></a>
setting.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When using the <tt class="docutils literal"><span class="pre">AppDirectoriesFinder</span></tt> finder, make sure your apps
can be found by staticfiles. Simply add the app to the
<a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a> setting of your site.</p>
</div>
<p>Static file finders are currently considered a private interface, and this
interface is thus undocumented.</p>
</div>
</div>
<div class="section" id="s-core-settings-topical-index">
<span id="core-settings-topical-index"></span><h2><a class="toc-backref" href="#id16">Core Settings Topical Index</a><a class="headerlink" href="#core-settings-topical-index" title="Permalink to this headline">¶</a></h2>
<div class="section" id="s-cache">
<span id="cache"></span><h3>Cache<a class="headerlink" href="#cache" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-CACHES"><tt class="xref std std-setting docutils literal"><span class="pre">CACHES</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CACHE_MIDDLEWARE_ALIAS"><tt class="xref std std-setting docutils literal"><span class="pre">CACHE_MIDDLEWARE_ALIAS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CACHE_MIDDLEWARE_ANONYMOUS_ONLY"><tt class="xref std std-setting docutils literal"><span class="pre">CACHE_MIDDLEWARE_ANONYMOUS_ONLY</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CACHE_MIDDLEWARE_KEY_PREFIX"><tt class="xref std std-setting docutils literal"><span class="pre">CACHE_MIDDLEWARE_KEY_PREFIX</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CACHE_MIDDLEWARE_SECONDS"><tt class="xref std std-setting docutils literal"><span class="pre">CACHE_MIDDLEWARE_SECONDS</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-database">
<span id="database"></span><h3>Database<a class="headerlink" href="#database" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DATABASES"><tt class="xref std std-setting docutils literal"><span class="pre">DATABASES</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DATABASE_ROUTERS"><tt class="xref std std-setting docutils literal"><span class="pre">DATABASE_ROUTERS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DEFAULT_INDEX_TABLESPACE"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_INDEX_TABLESPACE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DEFAULT_TABLESPACE"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_TABLESPACE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TRANSACTIONS_MANAGED"><tt class="xref std std-setting docutils literal"><span class="pre">TRANSACTIONS_MANAGED</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-debugging">
<span id="debugging"></span><h3>Debugging<a class="headerlink" href="#debugging" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DEBUG_PROPAGATE_EXCEPTIONS"><tt class="xref std std-setting docutils literal"><span class="pre">DEBUG_PROPAGATE_EXCEPTIONS</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-email">
<span id="email"></span><h3>Email<a class="headerlink" href="#email" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-ADMINS"><tt class="xref std std-setting docutils literal"><span class="pre">ADMINS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DEFAULT_CHARSET"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_CHARSET</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DEFAULT_FROM_EMAIL"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_FROM_EMAIL</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_BACKEND"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_BACKEND</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_FILE_PATH"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_FILE_PATH</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_HOST_PASSWORD"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST_PASSWORD</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_HOST_USER"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_HOST_USER</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_PORT"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_PORT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_SUBJECT_PREFIX"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_SUBJECT_PREFIX</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-EMAIL_USE_TLS"><tt class="xref std std-setting docutils literal"><span class="pre">EMAIL_USE_TLS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-MANAGERS"><tt class="xref std std-setting docutils literal"><span class="pre">MANAGERS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SEND_BROKEN_LINK_EMAILS"><tt class="xref std std-setting docutils literal"><span class="pre">SEND_BROKEN_LINK_EMAILS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SERVER_EMAIL"><tt class="xref std std-setting docutils literal"><span class="pre">SERVER_EMAIL</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-error-reporting">
<span id="error-reporting"></span><h3>Error reporting<a class="headerlink" href="#error-reporting" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DEFAULT_EXCEPTION_REPORTER_FILTER"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_EXCEPTION_REPORTER_FILTER</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-IGNORABLE_404_URLS"><tt class="xref std std-setting docutils literal"><span class="pre">IGNORABLE_404_URLS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-MANAGERS"><tt class="xref std std-setting docutils literal"><span class="pre">MANAGERS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SEND_BROKEN_LINK_EMAILS"><tt class="xref std std-setting docutils literal"><span class="pre">SEND_BROKEN_LINK_EMAILS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SILENCED_SYSTEM_CHECKS"><tt class="xref std std-setting docutils literal"><span class="pre">SILENCED_SYSTEM_CHECKS</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-file-uploads">
<span id="s-file-upload-settings"></span><span id="file-uploads"></span><span id="file-upload-settings"></span><h3>File uploads<a class="headerlink" href="#file-uploads" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DEFAULT_FILE_STORAGE"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_FILE_STORAGE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FILE_CHARSET"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_CHARSET</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FILE_UPLOAD_HANDLERS"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_HANDLERS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FILE_UPLOAD_MAX_MEMORY_SIZE"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_MAX_MEMORY_SIZE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FILE_UPLOAD_PERMISSIONS"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_PERMISSIONS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FILE_UPLOAD_TEMP_DIR"><tt class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_TEMP_DIR</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-MEDIA_ROOT"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_ROOT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-MEDIA_URL"><tt class="xref std std-setting docutils literal"><span class="pre">MEDIA_URL</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-globalization-i18n-l10n">
<span id="globalization-i18n-l10n"></span><h3>Globalization (i18n/l10n)<a class="headerlink" href="#globalization-i18n-l10n" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_FORMAT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DATE_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">DATE_INPUT_FORMATS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_FORMAT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DATETIME_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">DATETIME_INPUT_FORMATS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DECIMAL_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">DECIMAL_SEPARATOR</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FIRST_DAY_OF_WEEK"><tt class="xref std std-setting docutils literal"><span class="pre">FIRST_DAY_OF_WEEK</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FORMAT_MODULE_PATH"><tt class="xref std std-setting docutils literal"><span class="pre">FORMAT_MODULE_PATH</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LANGUAGE_CODE"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_CODE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_AGE"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_AGE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_DOMAIN"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_DOMAIN</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_NAME</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LANGUAGE_COOKIE_PATH"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGE_COOKIE_PATH</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LANGUAGES"><tt class="xref std std-setting docutils literal"><span class="pre">LANGUAGES</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LOCALE_PATHS"><tt class="xref std std-setting docutils literal"><span class="pre">LOCALE_PATHS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-MONTH_DAY_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">MONTH_DAY_FORMAT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-NUMBER_GROUPING"><tt class="xref std std-setting docutils literal"><span class="pre">NUMBER_GROUPING</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SHORT_DATE_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATE_FORMAT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SHORT_DATETIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">SHORT_DATETIME_FORMAT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">THOUSAND_SEPARATOR</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TIME_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_FORMAT</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TIME_INPUT_FORMATS"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_INPUT_FORMATS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TIME_ZONE"><tt class="xref std std-setting docutils literal"><span class="pre">TIME_ZONE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-USE_I18N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_I18N</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-USE_L10N"><tt class="xref std std-setting docutils literal"><span class="pre">USE_L10N</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-USE_THOUSAND_SEPARATOR"><tt class="xref std std-setting docutils literal"><span class="pre">USE_THOUSAND_SEPARATOR</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-USE_TZ"><tt class="xref std std-setting docutils literal"><span class="pre">USE_TZ</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-YEAR_MONTH_FORMAT"><tt class="xref std std-setting docutils literal"><span class="pre">YEAR_MONTH_FORMAT</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-http">
<span id="http"></span><h3>HTTP<a class="headerlink" href="#http" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DEFAULT_CHARSET"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_CHARSET</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DEFAULT_CONTENT_TYPE"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_CONTENT_TYPE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-DISALLOWED_USER_AGENTS"><tt class="xref std std-setting docutils literal"><span class="pre">DISALLOWED_USER_AGENTS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FORCE_SCRIPT_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">FORCE_SCRIPT_NAME</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-INTERNAL_IPS"><tt class="xref std std-setting docutils literal"><span class="pre">INTERNAL_IPS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-MIDDLEWARE_CLASSES"><tt class="xref std std-setting docutils literal"><span class="pre">MIDDLEWARE_CLASSES</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SECURE_PROXY_SSL_HEADER"><tt class="xref std std-setting docutils literal"><span class="pre">SECURE_PROXY_SSL_HEADER</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SIGNING_BACKEND"><tt class="xref std std-setting docutils literal"><span class="pre">SIGNING_BACKEND</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-USE_ETAGS"><tt class="xref std std-setting docutils literal"><span class="pre">USE_ETAGS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-USE_X_FORWARDED_HOST"><tt class="xref std std-setting docutils literal"><span class="pre">USE_X_FORWARDED_HOST</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-WSGI_APPLICATION"><tt class="xref std std-setting docutils literal"><span class="pre">WSGI_APPLICATION</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-id8">
<span id="id8"></span><h3>Logging<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-LOGGING"><tt class="xref std std-setting docutils literal"><span class="pre">LOGGING</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-LOGGING_CONFIG"><tt class="xref std std-setting docutils literal"><span class="pre">LOGGING_CONFIG</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-models">
<span id="models"></span><h3>Models<a class="headerlink" href="#models" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-ABSOLUTE_URL_OVERRIDES"><tt class="xref std std-setting docutils literal"><span class="pre">ABSOLUTE_URL_OVERRIDES</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-FIXTURE_DIRS"><tt class="xref std std-setting docutils literal"><span class="pre">FIXTURE_DIRS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-INSTALLED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">INSTALLED_APPS</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-security">
<span id="security"></span><h3>Security<a class="headerlink" href="#security" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Cross Site Request Forgery protection<ul>
<li><a class="reference internal" href="#std:setting-CSRF_COOKIE_DOMAIN"><tt class="xref std std-setting docutils literal"><span class="pre">CSRF_COOKIE_DOMAIN</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CSRF_COOKIE_NAME"><tt class="xref std std-setting docutils literal"><span class="pre">CSRF_COOKIE_NAME</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CSRF_COOKIE_PATH"><tt class="xref std std-setting docutils literal"><span class="pre">CSRF_COOKIE_PATH</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CSRF_COOKIE_SECURE"><tt class="xref std std-setting docutils literal"><span class="pre">CSRF_COOKIE_SECURE</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-CSRF_FAILURE_VIEW"><tt class="xref std std-setting docutils literal"><span class="pre">CSRF_FAILURE_VIEW</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#std:setting-SECRET_KEY"><tt class="xref std std-setting docutils literal"><span class="pre">SECRET_KEY</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-X_FRAME_OPTIONS"><tt class="xref std std-setting docutils literal"><span class="pre">X_FRAME_OPTIONS</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-serialization">
<span id="serialization"></span><h3>Serialization<a class="headerlink" href="#serialization" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-DEFAULT_CHARSET"><tt class="xref std std-setting docutils literal"><span class="pre">DEFAULT_CHARSET</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-SERIALIZATION_MODULES"><tt class="xref std std-setting docutils literal"><span class="pre">SERIALIZATION_MODULES</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-templates">
<span id="templates"></span><h3>Templates<a class="headerlink" href="#templates" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-ALLOWED_INCLUDE_ROOTS"><tt class="xref std std-setting docutils literal"><span class="pre">ALLOWED_INCLUDE_ROOTS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEMPLATE_CONTEXT_PROCESSORS"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_CONTEXT_PROCESSORS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEMPLATE_DEBUG"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_DEBUG</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEMPLATE_DIRS"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_DIRS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEMPLATE_LOADERS"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_LOADERS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEMPLATE_STRING_IF_INVALID"><tt class="xref std std-setting docutils literal"><span class="pre">TEMPLATE_STRING_IF_INVALID</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-testing">
<span id="testing"></span><h3>Testing<a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Database: <a class="reference internal" href="#std:setting-DATABASE-TEST"><tt class="xref std std-setting docutils literal"><span class="pre">TEST</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEST_NON_SERIALIZED_APPS"><tt class="xref std std-setting docutils literal"><span class="pre">TEST_NON_SERIALIZED_APPS</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-TEST_RUNNER"><tt class="xref std std-setting docutils literal"><span class="pre">TEST_RUNNER</span></tt></a></li>
</ul>
</div>
<div class="section" id="s-urls">
<span id="urls"></span><h3>URLs<a class="headerlink" href="#urls" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="#std:setting-APPEND_SLASH"><tt class="xref std std-setting docutils literal"><span class="pre">APPEND_SLASH</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-PREPEND_WWW"><tt class="xref std std-setting docutils literal"><span class="pre">PREPEND_WWW</span></tt></a></li>
<li><a class="reference internal" href="#std:setting-ROOT_URLCONF"><tt class="xref std std-setting docutils literal"><span class="pre">ROOT_URLCONF</span></tt></a></li>
</ul>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Settings</a><ul>
<li><a class="reference internal" href="#core-settings">Core settings</a><ul>
<li><a class="reference internal" href="#absolute-url-overrides">ABSOLUTE_URL_OVERRIDES</a></li>
<li><a class="reference internal" href="#admins">ADMINS</a></li>
<li><a class="reference internal" href="#allowed-hosts">ALLOWED_HOSTS</a></li>
<li><a class="reference internal" href="#allowed-include-roots">ALLOWED_INCLUDE_ROOTS</a></li>
<li><a class="reference internal" href="#append-slash">APPEND_SLASH</a></li>
<li><a class="reference internal" href="#caches">CACHES</a><ul>
<li><a class="reference internal" href="#backend">BACKEND</a></li>
<li><a class="reference internal" href="#key-function">KEY_FUNCTION</a></li>
<li><a class="reference internal" href="#key-prefix">KEY_PREFIX</a></li>
<li><a class="reference internal" href="#location">LOCATION</a></li>
<li><a class="reference internal" href="#options">OPTIONS</a></li>
<li><a class="reference internal" href="#timeout">TIMEOUT</a></li>
<li><a class="reference internal" href="#version">VERSION</a></li>
</ul>
</li>
<li><a class="reference internal" href="#cache-middleware-alias">CACHE_MIDDLEWARE_ALIAS</a></li>
<li><a class="reference internal" href="#cache-middleware-anonymous-only">CACHE_MIDDLEWARE_ANONYMOUS_ONLY</a></li>
<li><a class="reference internal" href="#cache-middleware-key-prefix">CACHE_MIDDLEWARE_KEY_PREFIX</a></li>
<li><a class="reference internal" href="#cache-middleware-seconds">CACHE_MIDDLEWARE_SECONDS</a></li>
<li><a class="reference internal" href="#csrf-cookie-age">CSRF_COOKIE_AGE</a></li>
<li><a class="reference internal" href="#csrf-cookie-domain">CSRF_COOKIE_DOMAIN</a></li>
<li><a class="reference internal" href="#csrf-cookie-httponly">CSRF_COOKIE_HTTPONLY</a></li>
<li><a class="reference internal" href="#csrf-cookie-name">CSRF_COOKIE_NAME</a></li>
<li><a class="reference internal" href="#csrf-cookie-path">CSRF_COOKIE_PATH</a></li>
<li><a class="reference internal" href="#csrf-cookie-secure">CSRF_COOKIE_SECURE</a></li>
<li><a class="reference internal" href="#csrf-failure-view">CSRF_FAILURE_VIEW</a></li>
<li><a class="reference internal" href="#databases">DATABASES</a><ul>
<li><a class="reference internal" href="#atomic-requests">ATOMIC_REQUESTS</a></li>
<li><a class="reference internal" href="#autocommit">AUTOCOMMIT</a></li>
<li><a class="reference internal" href="#engine">ENGINE</a></li>
<li><a class="reference internal" href="#host">HOST</a></li>
<li><a class="reference internal" href="#name">NAME</a></li>
<li><a class="reference internal" href="#conn-max-age">CONN_MAX_AGE</a></li>
<li><a class="reference internal" href="#std:setting-OPTIONS">OPTIONS</a></li>
<li><a class="reference internal" href="#password">PASSWORD</a></li>
<li><a class="reference internal" href="#port">PORT</a></li>
<li><a class="reference internal" href="#user">USER</a></li>
<li><a class="reference internal" href="#test">TEST</a><ul>
<li><a class="reference internal" href="#charset">CHARSET</a></li>
<li><a class="reference internal" href="#collation">COLLATION</a></li>
<li><a class="reference internal" href="#dependencies">DEPENDENCIES</a></li>
<li><a class="reference internal" href="#mirror">MIRROR</a></li>
<li><a class="reference internal" href="#std:setting-TEST_NAME">NAME</a></li>
<li><a class="reference internal" href="#serialize">SERIALIZE</a></li>
<li><a class="reference internal" href="#create-db">CREATE_DB</a></li>
<li><a class="reference internal" href="#create-user">CREATE_USER</a></li>
<li><a class="reference internal" href="#std:setting-TEST_USER">USER</a></li>
<li><a class="reference internal" href="#std:setting-TEST_PASSWD">PASSWORD</a></li>
<li><a class="reference internal" href="#tblspace">TBLSPACE</a></li>
<li><a class="reference internal" href="#tblspace-tmp">TBLSPACE_TMP</a></li>
</ul>
</li>
<li><a class="reference internal" href="#test-charset">TEST_CHARSET</a></li>
<li><a class="reference internal" href="#test-collation">TEST_COLLATION</a></li>
<li><a class="reference internal" href="#test-dependencies">TEST_DEPENDENCIES</a></li>
<li><a class="reference internal" href="#test-mirror">TEST_MIRROR</a></li>
<li><a class="reference internal" href="#test-name">TEST_NAME</a></li>
<li><a class="reference internal" href="#test-create">TEST_CREATE</a></li>
<li><a class="reference internal" href="#test-user">TEST_USER</a></li>
<li><a class="reference internal" href="#test-user-create">TEST_USER_CREATE</a></li>
<li><a class="reference internal" href="#test-passwd">TEST_PASSWD</a></li>
<li><a class="reference internal" href="#test-tblspace">TEST_TBLSPACE</a></li>
<li><a class="reference internal" href="#test-tblspace-tmp">TEST_TBLSPACE_TMP</a></li>
</ul>
</li>
<li><a class="reference internal" href="#database-routers">DATABASE_ROUTERS</a></li>
<li><a class="reference internal" href="#date-format">DATE_FORMAT</a></li>
<li><a class="reference internal" href="#date-input-formats">DATE_INPUT_FORMATS</a></li>
<li><a class="reference internal" href="#datetime-format">DATETIME_FORMAT</a></li>
<li><a class="reference internal" href="#datetime-input-formats">DATETIME_INPUT_FORMATS</a></li>
<li><a class="reference internal" href="#debug">DEBUG</a></li>
<li><a class="reference internal" href="#debug-propagate-exceptions">DEBUG_PROPAGATE_EXCEPTIONS</a></li>
<li><a class="reference internal" href="#decimal-separator">DECIMAL_SEPARATOR</a></li>
<li><a class="reference internal" href="#default-charset">DEFAULT_CHARSET</a></li>
<li><a class="reference internal" href="#default-content-type">DEFAULT_CONTENT_TYPE</a></li>
<li><a class="reference internal" href="#default-exception-reporter-filter">DEFAULT_EXCEPTION_REPORTER_FILTER</a></li>
<li><a class="reference internal" href="#default-file-storage">DEFAULT_FILE_STORAGE</a></li>
<li><a class="reference internal" href="#default-from-email">DEFAULT_FROM_EMAIL</a></li>
<li><a class="reference internal" href="#default-index-tablespace">DEFAULT_INDEX_TABLESPACE</a></li>
<li><a class="reference internal" href="#default-tablespace">DEFAULT_TABLESPACE</a></li>
<li><a class="reference internal" href="#disallowed-user-agents">DISALLOWED_USER_AGENTS</a></li>
<li><a class="reference internal" href="#email-backend">EMAIL_BACKEND</a></li>
<li><a class="reference internal" href="#email-file-path">EMAIL_FILE_PATH</a></li>
<li><a class="reference internal" href="#email-host">EMAIL_HOST</a></li>
<li><a class="reference internal" href="#email-host-password">EMAIL_HOST_PASSWORD</a></li>
<li><a class="reference internal" href="#email-host-user">EMAIL_HOST_USER</a></li>
<li><a class="reference internal" href="#email-port">EMAIL_PORT</a></li>
<li><a class="reference internal" href="#email-subject-prefix">EMAIL_SUBJECT_PREFIX</a></li>
<li><a class="reference internal" href="#email-use-tls">EMAIL_USE_TLS</a></li>
<li><a class="reference internal" href="#email-use-ssl">EMAIL_USE_SSL</a></li>
<li><a class="reference internal" href="#file-charset">FILE_CHARSET</a></li>
<li><a class="reference internal" href="#file-upload-handlers">FILE_UPLOAD_HANDLERS</a></li>
<li><a class="reference internal" href="#file-upload-max-memory-size">FILE_UPLOAD_MAX_MEMORY_SIZE</a></li>
<li><a class="reference internal" href="#file-upload-directory-permissions">FILE_UPLOAD_DIRECTORY_PERMISSIONS</a></li>
<li><a class="reference internal" href="#file-upload-permissions">FILE_UPLOAD_PERMISSIONS</a></li>
<li><a class="reference internal" href="#file-upload-temp-dir">FILE_UPLOAD_TEMP_DIR</a></li>
<li><a class="reference internal" href="#first-day-of-week">FIRST_DAY_OF_WEEK</a></li>
<li><a class="reference internal" href="#fixture-dirs">FIXTURE_DIRS</a></li>
<li><a class="reference internal" href="#force-script-name">FORCE_SCRIPT_NAME</a></li>
<li><a class="reference internal" href="#format-module-path">FORMAT_MODULE_PATH</a></li>
<li><a class="reference internal" href="#ignorable-404-urls">IGNORABLE_404_URLS</a></li>
<li><a class="reference internal" href="#installed-apps">INSTALLED_APPS</a></li>
<li><a class="reference internal" href="#internal-ips">INTERNAL_IPS</a></li>
<li><a class="reference internal" href="#language-code">LANGUAGE_CODE</a></li>
<li><a class="reference internal" href="#language-cookie-age">LANGUAGE_COOKIE_AGE</a></li>
<li><a class="reference internal" href="#language-cookie-domain">LANGUAGE_COOKIE_DOMAIN</a></li>
<li><a class="reference internal" href="#language-cookie-name">LANGUAGE_COOKIE_NAME</a></li>
<li><a class="reference internal" href="#language-cookie-path">LANGUAGE_COOKIE_PATH</a></li>
<li><a class="reference internal" href="#languages">LANGUAGES</a></li>
<li><a class="reference internal" href="#locale-paths">LOCALE_PATHS</a></li>
<li><a class="reference internal" href="#logging">LOGGING</a></li>
<li><a class="reference internal" href="#logging-config">LOGGING_CONFIG</a></li>
<li><a class="reference internal" href="#managers">MANAGERS</a></li>
<li><a class="reference internal" href="#media-root">MEDIA_ROOT</a></li>
<li><a class="reference internal" href="#media-url">MEDIA_URL</a></li>
<li><a class="reference internal" href="#middleware-classes">MIDDLEWARE_CLASSES</a></li>
<li><a class="reference internal" href="#migration-modules">MIGRATION_MODULES</a></li>
<li><a class="reference internal" href="#month-day-format">MONTH_DAY_FORMAT</a></li>
<li><a class="reference internal" href="#number-grouping">NUMBER_GROUPING</a></li>
<li><a class="reference internal" href="#prepend-www">PREPEND_WWW</a></li>
<li><a class="reference internal" href="#root-urlconf">ROOT_URLCONF</a></li>
<li><a class="reference internal" href="#secret-key">SECRET_KEY</a></li>
<li><a class="reference internal" href="#secure-proxy-ssl-header">SECURE_PROXY_SSL_HEADER</a></li>
<li><a class="reference internal" href="#send-broken-link-emails">SEND_BROKEN_LINK_EMAILS</a></li>
<li><a class="reference internal" href="#serialization-modules">SERIALIZATION_MODULES</a></li>
<li><a class="reference internal" href="#server-email">SERVER_EMAIL</a></li>
<li><a class="reference internal" href="#short-date-format">SHORT_DATE_FORMAT</a></li>
<li><a class="reference internal" href="#short-datetime-format">SHORT_DATETIME_FORMAT</a></li>
<li><a class="reference internal" href="#signing-backend">SIGNING_BACKEND</a></li>
<li><a class="reference internal" href="#silenced-system-checks">SILENCED_SYSTEM_CHECKS</a></li>
<li><a class="reference internal" href="#template-context-processors">TEMPLATE_CONTEXT_PROCESSORS</a></li>
<li><a class="reference internal" href="#template-debug">TEMPLATE_DEBUG</a></li>
<li><a class="reference internal" href="#template-dirs">TEMPLATE_DIRS</a></li>
<li><a class="reference internal" href="#template-loaders">TEMPLATE_LOADERS</a></li>
<li><a class="reference internal" href="#template-string-if-invalid">TEMPLATE_STRING_IF_INVALID</a></li>
<li><a class="reference internal" href="#test-runner">TEST_RUNNER</a></li>
<li><a class="reference internal" href="#test-non-serialized-apps">TEST_NON_SERIALIZED_APPS</a></li>
<li><a class="reference internal" href="#thousand-separator">THOUSAND_SEPARATOR</a></li>
<li><a class="reference internal" href="#time-format">TIME_FORMAT</a></li>
<li><a class="reference internal" href="#time-input-formats">TIME_INPUT_FORMATS</a></li>
<li><a class="reference internal" href="#time-zone">TIME_ZONE</a></li>
<li><a class="reference internal" href="#transactions-managed">TRANSACTIONS_MANAGED</a></li>
<li><a class="reference internal" href="#use-etags">USE_ETAGS</a></li>
<li><a class="reference internal" href="#use-i18n">USE_I18N</a></li>
<li><a class="reference internal" href="#use-l10n">USE_L10N</a></li>
<li><a class="reference internal" href="#use-thousand-separator">USE_THOUSAND_SEPARATOR</a></li>
<li><a class="reference internal" href="#use-tz">USE_TZ</a></li>
<li><a class="reference internal" href="#use-x-forwarded-host">USE_X_FORWARDED_HOST</a></li>
<li><a class="reference internal" href="#wsgi-application">WSGI_APPLICATION</a></li>
<li><a class="reference internal" href="#year-month-format">YEAR_MONTH_FORMAT</a></li>
<li><a class="reference internal" href="#x-frame-options">X_FRAME_OPTIONS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#auth">Auth</a><ul>
<li><a class="reference internal" href="#authentication-backends">AUTHENTICATION_BACKENDS</a></li>
<li><a class="reference internal" href="#auth-user-model">AUTH_USER_MODEL</a></li>
<li><a class="reference internal" href="#login-redirect-url">LOGIN_REDIRECT_URL</a></li>
<li><a class="reference internal" href="#login-url">LOGIN_URL</a></li>
<li><a class="reference internal" href="#logout-url">LOGOUT_URL</a></li>
<li><a class="reference internal" href="#password-reset-timeout-days">PASSWORD_RESET_TIMEOUT_DAYS</a></li>
<li><a class="reference internal" href="#password-hashers">PASSWORD_HASHERS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#comments">Comments</a><ul>
<li><a class="reference internal" href="#comments-hide-removed">COMMENTS_HIDE_REMOVED</a></li>
<li><a class="reference internal" href="#comment-max-length">COMMENT_MAX_LENGTH</a></li>
<li><a class="reference internal" href="#comments-app">COMMENTS_APP</a></li>
<li><a class="reference internal" href="#profanities-list">PROFANITIES_LIST</a></li>
</ul>
</li>
<li><a class="reference internal" href="#messages">Messages</a><ul>
<li><a class="reference internal" href="#message-level">MESSAGE_LEVEL</a></li>
<li><a class="reference internal" href="#message-storage">MESSAGE_STORAGE</a></li>
<li><a class="reference internal" href="#message-tags">MESSAGE_TAGS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sessions">Sessions</a><ul>
<li><a class="reference internal" href="#session-cache-alias">SESSION_CACHE_ALIAS</a></li>
<li><a class="reference internal" href="#session-cookie-age">SESSION_COOKIE_AGE</a></li>
<li><a class="reference internal" href="#session-cookie-domain">SESSION_COOKIE_DOMAIN</a></li>
<li><a class="reference internal" href="#session-cookie-httponly">SESSION_COOKIE_HTTPONLY</a></li>
<li><a class="reference internal" href="#session-cookie-name">SESSION_COOKIE_NAME</a></li>
<li><a class="reference internal" href="#session-cookie-path">SESSION_COOKIE_PATH</a></li>
<li><a class="reference internal" href="#session-cookie-secure">SESSION_COOKIE_SECURE</a></li>
<li><a class="reference internal" href="#session-engine">SESSION_ENGINE</a></li>
<li><a class="reference internal" href="#session-expire-at-browser-close">SESSION_EXPIRE_AT_BROWSER_CLOSE</a></li>
<li><a class="reference internal" href="#session-file-path">SESSION_FILE_PATH</a></li>
<li><a class="reference internal" href="#session-save-every-request">SESSION_SAVE_EVERY_REQUEST</a></li>
<li><a class="reference internal" href="#session-serializer">SESSION_SERIALIZER</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sites">Sites</a><ul>
<li><a class="reference internal" href="#site-id">SITE_ID</a></li>
</ul>
</li>
<li><a class="reference internal" href="#static-files">Static files</a><ul>
<li><a class="reference internal" href="#static-root">STATIC_ROOT</a></li>
<li><a class="reference internal" href="#static-url">STATIC_URL</a></li>
<li><a class="reference internal" href="#staticfiles-dirs">STATICFILES_DIRS</a><ul>
<li><a class="reference internal" href="#prefixes-optional">Prefixes (optional)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#staticfiles-storage">STATICFILES_STORAGE</a></li>
<li><a class="reference internal" href="#staticfiles-finders">STATICFILES_FINDERS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#core-settings-topical-index">Core Settings Topical Index</a><ul>
<li><a class="reference internal" href="#cache">Cache</a></li>
<li><a class="reference internal" href="#database">Database</a></li>
<li><a class="reference internal" href="#debugging">Debugging</a></li>
<li><a class="reference internal" href="#email">Email</a></li>
<li><a class="reference internal" href="#error-reporting">Error reporting</a></li>
<li><a class="reference internal" href="#file-uploads">File uploads</a></li>
<li><a class="reference internal" href="#globalization-i18n-l10n">Globalization (i18n/l10n)</a></li>
<li><a class="reference internal" href="#http">HTTP</a></li>
<li><a class="reference internal" href="#id8">Logging</a></li>
<li><a class="reference internal" href="#models">Models</a></li>
<li><a class="reference internal" href="#security">Security</a></li>
<li><a class="reference internal" href="#serialization">Serialization</a></li>
<li><a class="reference internal" href="#templates">Templates</a></li>
<li><a class="reference internal" href="#testing">Testing</a></li>
<li><a class="reference internal" href="#urls">URLs</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="schema-editor.html"><tt class="docutils literal"><span class="pre">SchemaEditor</span></tt></a></li>
    
    
      <li>Next: <a href="signals.html">Signals</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django 1.7.8.dev20150401230226 documentation</a>
        
          <ul><li><a href="index.html">API Reference</a>
        
        <ul><li>Settings</li></ul>
        </li></ul>
      </li>
  </ul>

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/ref/settings.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Apr 02, 2015</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="schema-editor.html" title="&lt;tt class=&#34;docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;SchemaEditor&lt;/span&gt;&lt;/tt&gt;">previous</a>
     |
    <a href="index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="signals.html" title="Signals">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>